X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fcli.rs;h=c8c14f2f6c007016bca07f63aaf77eeb0cec1ab1;hb=0878cb69e0e575c0e834c59e170a3ee2823325e9;hp=f762fe5e5d8f1bc322cd69687b953c7ef3291703;hpb=4901136cfe2e50e66b3e999c1fbcec5e618ba4b5;p=ldk-sample diff --git a/src/cli.rs b/src/cli.rs index f762fe5..c8c14f2 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -391,14 +391,16 @@ pub(crate) async fn poll_for_user_input( } fn help() { - println!("openchannel pubkey@host:port "); + println!("openchannel pubkey@host:port "); println!("sendpayment "); - println!("getinvoice "); + println!("getinvoice "); println!("connectpeer pubkey@host:port"); println!("listchannels"); println!("listpayments"); println!("closechannel "); println!("forceclosechannel "); + println!("nodeinfo"); + println!("listpeers"); } fn node_info(channel_manager: Arc, peer_manager: Arc) { @@ -424,19 +426,22 @@ fn list_channels(channel_manager: Arc) { println!(""); println!("\t{{"); println!("\t\tchannel_id: {},", hex_utils::hex_str(&chan_info.channel_id[..])); + if let Some(funding_txo) = chan_info.funding_txo { + println!("\t\tfunding_txid: {},", funding_txo.txid); + } println!( "\t\tpeer_pubkey: {},", hex_utils::hex_str(&chan_info.remote_network_id.serialize()) ); - let mut pending_channel = false; - match chan_info.short_channel_id { - Some(id) => println!("\t\tshort_channel_id: {},", id), - None => { - pending_channel = true; - } + if let Some(id) = chan_info.short_channel_id { + println!("\t\tshort_channel_id: {},", id); } - println!("\t\tpending_open: {},", pending_channel); + println!("\t\tis_confirmed_onchain: {},", chan_info.is_funding_locked); println!("\t\tchannel_value_satoshis: {},", chan_info.channel_value_satoshis); + 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); + } println!("\t\tchannel_can_send_payments: {},", chan_info.is_usable); println!("\t}},"); }