From 17173a6322777a321a5087ccd8ba097138c90a66 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Mon, 14 Aug 2017 15:51:17 +0200 Subject: [PATCH] jsonrpc: Add `connected` field to getpeers This was implicitly indicated by the presence of the owner field, making it explicit. --- lightningd/peer_control.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 23fe9e213..c66252756 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -862,6 +862,7 @@ static void json_getpeers(struct command *cmd, json_add_string(response, "netaddr", netaddr_name(response, &p->netaddr)); json_add_pubkey(response, "peerid", &p->id); + json_add_bool(response, "connected", p->owner != NULL); if (p->owner) json_add_string(response, "owner", p->owner->name); if (p->scid)