projects
/
ldk-sample
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
34c30f0
)
Display our local balance in addition to the available-for-send balance
author
Matt Corallo
<git@bluematt.me>
Fri, 30 Jul 2021 16:21:06 +0000
(16:21 +0000)
committer
Matt Corallo
<git@bluematt.me>
Fri, 30 Jul 2021 16:31:25 +0000
(16:31 +0000)
src/cli.rs
patch
|
blob
|
history
diff --git
a/src/cli.rs
b/src/cli.rs
index f8597e33a19439b94c4c7516bce42671fe8eda81..d4d7e9ed4263079d84f3e3e42d1efc269f8f5404 100644
(file)
--- a/
src/cli.rs
+++ b/
src/cli.rs
@@
-462,6
+462,11
@@
fn list_channels(channel_manager: Arc<ChannelManager>) {
}
println!("\t\tis_confirmed_onchain: {},", chan_info.is_funding_locked);
println!("\t\tchannel_value_satoshis: {},", chan_info.channel_value_satoshis);
}
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);
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);