Skip to content

Commit c3218f2

Browse files
authored
Merge pull request #11 from valentinewallace/expose-channel-publicness
Indicate whether a channel is public in `listchannels`
2 parents 29e6a3a + df4c999 commit c3218f2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/cli.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,14 +391,16 @@ pub(crate) async fn poll_for_user_input(
391391
}
392392

393393
fn help() {
394-
println!("openchannel pubkey@host:port <channel_amt_satoshis>");
394+
println!("openchannel pubkey@host:port <amt_satoshis>");
395395
println!("sendpayment <invoice>");
396-
println!("getinvoice <amt_in_millisatoshis>");
396+
println!("getinvoice <amt_millisatoshis>");
397397
println!("connectpeer pubkey@host:port");
398398
println!("listchannels");
399399
println!("listpayments");
400400
println!("closechannel <channel_id>");
401401
println!("forceclosechannel <channel_id>");
402+
println!("nodeinfo");
403+
println!("listpeers");
402404
}
403405

404406
fn node_info(channel_manager: Arc<ChannelManager>, peer_manager: Arc<PeerManager>) {
@@ -441,6 +443,7 @@ fn list_channels(channel_manager: Arc<ChannelManager>) {
441443
println!("\t\tavailable_balance_for_recv_msat: {},", chan_info.inbound_capacity_msat);
442444
}
443445
println!("\t\tchannel_can_send_payments: {},", chan_info.is_usable);
446+
println!("\t\tpublic: {},", chan_info.is_public);
444447
println!("\t}},");
445448
}
446449
println!("]");
@@ -543,7 +546,7 @@ fn open_channel(
543546
}
544547
// lnd's max to_self_delay is 2016, so we want to be compatible.
545548
config.peer_channel_config_limits.their_to_self_delay = 2016;
546-
match channel_manager.create_channel(peer_pubkey, channel_amt_sat, 0, 0, None) {
549+
match channel_manager.create_channel(peer_pubkey, channel_amt_sat, 0, 0, Some(config)) {
547550
Ok(_) => {
548551
println!("EVENT: initiated channel with peer {}. ", peer_pubkey);
549552
return Ok(());

0 commit comments

Comments
 (0)