mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-11 10:04:28 +01:00
json_listpeers: use channel connected flag for JSON.
If a channel is active (ie. not onchaind) and has an owner, this should be equivalent. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -764,7 +764,7 @@ static void gossipd_getpeers_complete(struct subd *gossip, const u8 *msg,
|
||||
connected = true;
|
||||
else {
|
||||
channel = peer_active_channel(p);
|
||||
connected = channel && channel->owner;
|
||||
connected = channel && channel->connected;
|
||||
}
|
||||
json_add_bool(response, "connected", connected);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user