From: Matt Corallo Date: Fri, 30 Jul 2021 16:21:06 +0000 (+0000) Subject: Display our local balance in addition to the available-for-send balance X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=5de2381e960870d9b58960e1db79a0a899d68d01;p=ldk-sample Display our local balance in addition to the available-for-send balance --- diff --git a/src/cli.rs b/src/cli.rs index f8597e3..d4d7e9e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -462,6 +462,11 @@ fn list_channels(channel_manager: Arc) { } println!("\t\tis_confirmed_onchain: {},", chan_info.is_funding_locked); println!("\t\tchannel_value_satoshis: {},", chan_info.channel_value_satoshis); + println!( + "\t\tlocal_balance_msat: {},", + chan_info.outbound_capacity_msat + + chan_info.unspendable_punishment_reserve.unwrap_or(0) * 1000 + ); if chan_info.is_usable { println!("\t\tavailable_balance_for_send_msat: {},", chan_info.outbound_capacity_msat); println!("\t\tavailable_balance_for_recv_msat: {},", chan_info.inbound_capacity_msat);