jsonrpc: Add connected field to getpeers

This was implicitly indicated by the presence of the owner field,
making it explicit.
This commit is contained in:
Christian Decker 2017-08-14 15:51:17 +02:00 committed by Rusty Russell
parent 221fe8c5f3
commit 17173a6322

View File

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