From f8e5de1974c9843e798459b87214fdcba11b3b4e Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 21 Jan 2018 11:20:16 -0800 Subject: [PATCH] listpeers: print channel configs Signed-off-by: William Casarin --- lightningd/peer_control.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 7f9ff9040..9cba687df 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -852,6 +852,15 @@ static void gossipd_getpeers_complete(struct subd *gossip, const u8 *msg, json_add_u64(response, "msatoshi_total", p->funding_satoshi * 1000); } + + /* channel config */ + json_add_u64(response, "dust_limit_satoshis", p->our_config.dust_limit_satoshis); + json_add_u64(response, "max_htlc_value_in_flight_msat", p->our_config.max_htlc_value_in_flight_msat); + json_add_u64(response, "channel_reserve_satoshis", p->our_config.channel_reserve_satoshis); + json_add_u64(response, "htlc_minimum_msat", p->our_config.htlc_minimum_msat); + json_add_num(response, "to_self_delay", p->our_config.to_self_delay); + json_add_num(response, "max_accepted_htlcs", p->our_config.max_accepted_htlcs); + json_object_end(response); json_array_end(response);