listpeers: include private field in channels output

Reveal channel's 'privacy' in `listpeers` output

Suggested-By: @shesek
This commit is contained in:
lisa neigut
2019-01-07 15:47:39 -08:00
committed by Rusty Russell
parent 36e060aa60
commit efa38875b2
3 changed files with 8 additions and 0 deletions

View File

@@ -716,6 +716,8 @@ static void json_add_peer(struct lightningd *ld,
json_add_txid(response,
"funding_txid",
&channel->funding_txid);
json_add_bool(response, "private",
!(channel->channel_flags & CHANNEL_FLAGS_ANNOUNCE_CHANNEL));
json_add_u64(response, "msatoshi_to_us",
channel->our_msatoshi);
json_add_u64(response, "msatoshi_to_us_min",