From: Jeffrey Czyz Date: Wed, 12 May 2021 18:35:26 +0000 (-0700) Subject: Merge pull request #11 from valentinewallace/expose-channel-publicness X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-sample;a=commitdiff_plain;h=c3218f27e26b5bc5e684fd967ce80546675104a9;hp=29e6a3a09a1886f1362bf0afad585fa418b248ca Merge pull request #11 from valentinewallace/expose-channel-publicness Indicate whether a channel is public in `listchannels` --- diff --git a/src/cli.rs b/src/cli.rs index c0aad15..36b9704 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) { @@ -441,6 +443,7 @@ fn list_channels(channel_manager: Arc) { println!("\t\tavailable_balance_for_recv_msat: {},", chan_info.inbound_capacity_msat); } println!("\t\tchannel_can_send_payments: {},", chan_info.is_usable); + println!("\t\tpublic: {},", chan_info.is_public); println!("\t}},"); } println!("]"); @@ -543,7 +546,7 @@ fn open_channel( } // lnd's max to_self_delay is 2016, so we want to be compatible. config.peer_channel_config_limits.their_to_self_delay = 2016; - match channel_manager.create_channel(peer_pubkey, channel_amt_sat, 0, 0, None) { + match channel_manager.create_channel(peer_pubkey, channel_amt_sat, 0, 0, Some(config)) { Ok(_) => { println!("EVENT: initiated channel with peer {}. ", peer_pubkey); return Ok(());