47
47
//!
48
48
//! let node_id = PublicKey::from_str("NODE_ID").unwrap();
49
49
//! let node_addr = "IP_ADDR:PORT".parse().unwrap();
50
- //! node.connect_open_channel(& node_id, & node_addr, 10000, false).unwrap();
50
+ //! node.connect_open_channel(node_id, node_addr, 10000, false).unwrap();
51
51
//!
52
52
//! let invoice = Invoice::from_str("INVOICE_STR").unwrap();
53
53
//! node.send_payment(&invoice).unwrap();
@@ -847,7 +847,7 @@ impl Node {
847
847
///
848
848
/// Returns a temporary channel id
849
849
pub fn connect_open_channel (
850
- & self , node_id : & PublicKey , address : & SocketAddr , channel_amount_sats : u64 ,
850
+ & self , node_id : PublicKey , address : SocketAddr , channel_amount_sats : u64 ,
851
851
announce_channel : bool ,
852
852
) -> Result < ( ) , Error > {
853
853
let runtime_lock = self . running . read ( ) . unwrap ( ) ;
@@ -863,7 +863,7 @@ impl Node {
863
863
return Err ( Error :: InsufficientFunds ) ;
864
864
}
865
865
866
- let peer_info = PeerInfo { pubkey : node_id. clone ( ) , address : address . clone ( ) } ;
866
+ let peer_info = PeerInfo { pubkey : node_id, address } ;
867
867
868
868
let con_peer_pubkey = peer_info. pubkey . clone ( ) ;
869
869
let con_peer_addr = peer_info. address . clone ( ) ;
0 commit comments