Browse Source

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>
ppa-0.6.1
Rusty Russell 7 years ago
parent
commit
e72e54f8d1
  1. 2
      lightningd/peer_control.c

2
lightningd/peer_control.c

@ -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);

Loading…
Cancel
Save