From 0878cb69e0e575c0e834c59e170a3ee2823325e9 Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Wed, 12 May 2021 13:22:52 -0400 Subject: [PATCH 1/3] Update `help` to include new commands and clean up parameters --- src/cli.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 9a0227ca..c8c14f2f 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) { From 0e55f81adc84fcf1ad9f31125235fc694fb3fa4e Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Wed, 12 May 2021 13:23:06 -0400 Subject: [PATCH 2/3] Indicate whether chan is public in listchannels --- src/cli.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cli.rs b/src/cli.rs index c8c14f2f..7e957e27 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -443,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!("]"); From df4c99984d6ac818fbdfaf4fd4df3043c6a3c74e Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Wed, 12 May 2021 13:33:19 -0400 Subject: [PATCH 3/3] Fix broken 'open public channels' feature --- src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 7e957e27..2ea72711 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -546,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(());