File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -94,15 +94,8 @@ pub(crate) fn poll_for_user_input(
9494 let pubkey = pubkey. unwrap ( ) ;
9595
9696 if peer_addr_str. is_none ( ) {
97- let mut peer_connected = false ;
98- for peer_details in peer_manager. list_peers ( ) {
99- if peer_details. counterparty_node_id == pubkey {
100- peer_connected = true ;
101- break ;
102- }
103- }
104- if peer_connected == false {
105- println ! ( "ERROR: Peer address not provided" ) ;
97+ if peer_manager. peer_by_node_id ( & pubkey) . is_none ( ) {
98+ println ! ( "ERROR: Peer address not provided and peer is not connected" ) ;
10699 continue ;
107100 }
108101 } else {
@@ -525,8 +518,7 @@ fn help() {
525518 println ! ( " help\t Shows a list of commands." ) ;
526519 println ! ( " quit\t Close the application." ) ;
527520 println ! ( "\n Channels:" ) ;
528- println ! ( " openchannel pubkey@host:port <amt_satoshis> [--public] [--with-anchors]" ) ;
529- println ! ( " openchannel pubkey <amt_satoshis> [--public] [--with-anchors]" ) ;
521+ println ! ( " openchannel pubkey@[host:port] <amt_satoshis> [--public] [--with-anchors]" ) ;
530522 println ! ( " closechannel <channel_id> <peer_pubkey>" ) ;
531523 println ! ( " forceclosechannel <channel_id> <peer_pubkey>" ) ;
532524 println ! ( " listchannels" ) ;
You can’t perform that action at this time.
0 commit comments