You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The /v1/channels GET endpoint comes back with {} if you have no channels. This is inconsistent with the gRPC API which comes back with { "channels": [] }.
Your environment
version of lnd 0.5.0-beta
which operating system (uname -a on *Nix) - macOS
version of btcd, bitcoind, or other backend - btcd simnet
Steps to reproduce
Hit the GET /v1/channels endpoint
Expected behaviour
{ "channels": [] }
Actual behaviour
{}
The text was updated successfully, but these errors were encountered:
I noticed this as well with the balance API when you have zero balance (for v1/balance/blockchain and v1/balance/channels) so I assume the api is just stripping out all falsey values or empty arrays. I'm going to change the issue title to reflect that larger scope.
wbobeirne
changed the title
/v1/channels GET endpoint response missing channels array if no channels
REST API responses missing falsey values
Oct 23, 2018
Yep, it's just the API removing "false-y" values. If the key isn't there, then you can assume it simply isn't present. In one case, there are no channels at all, in the other case, it looks like there have been in the DB in the past, so a slice gets created, but not fully populated.
Background
The
/v1/channels
GET endpoint comes back with{}
if you have no channels. This is inconsistent with the gRPC API which comes back with{ "channels": [] }
.Your environment
lnd
0.5.0-betauname -a
on *Nix) - macOSbtcd
,bitcoind
, or other backend - btcd simnetSteps to reproduce
Hit the GET
/v1/channels
endpointExpected behaviour
{ "channels": [] }
Actual behaviour
{}
The text was updated successfully, but these errors were encountered: