From e72e54f8d1a8e54ead5c755bd7d6d7d3596f654f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 26 Apr 2018 14:21:01 +0930 Subject: [PATCH] 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 --- lightningd/peer_control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 1b84b31c1..8cb6ba580 100644 --- a/lightningd/peer_control.c +++ b/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);