@@ -844,8 +844,8 @@ impl Node {
844
844
}
845
845
846
846
/// Returns our own listening address.
847
- pub fn listening_address ( & self ) -> Option < & SocketAddr > {
848
- self . config . listening_address . as_ref ( )
847
+ pub fn listening_address ( & self ) -> Option < SocketAddr > {
848
+ self . config . listening_address
849
849
}
850
850
851
851
/// Retrieve a new on-chain/funding address.
@@ -939,7 +939,7 @@ impl Node {
939
939
///
940
940
/// Will also remove the peer from the peer store, i.e., after this has been called we won't
941
941
/// try to reconnect on restart.
942
- pub fn disconnect ( & self , counterparty_node_id : & PublicKey ) -> Result < ( ) , Error > {
942
+ pub fn disconnect ( & self , counterparty_node_id : PublicKey ) -> Result < ( ) , Error > {
943
943
let rt_lock = self . runtime . read ( ) . unwrap ( ) ;
944
944
if rt_lock. is_none ( ) {
945
945
return Err ( Error :: NotRunning ) ;
@@ -954,7 +954,7 @@ impl Node {
954
954
}
955
955
}
956
956
957
- self . peer_manager . disconnect_by_node_id ( * counterparty_node_id) ;
957
+ self . peer_manager . disconnect_by_node_id ( counterparty_node_id) ;
958
958
Ok ( ( ) )
959
959
}
960
960
@@ -1112,10 +1112,10 @@ impl Node {
1112
1112
1113
1113
/// Close a previously opened channel.
1114
1114
pub fn close_channel (
1115
- & self , channel_id : & [ u8 ; 32 ] , counterparty_node_id : & PublicKey ,
1115
+ & self , channel_id : & [ u8 ; 32 ] , counterparty_node_id : PublicKey ,
1116
1116
) -> Result < ( ) , Error > {
1117
- self . peer_store . remove_peer ( counterparty_node_id) ?;
1118
- match self . channel_manager . close_channel ( channel_id, counterparty_node_id) {
1117
+ self . peer_store . remove_peer ( & counterparty_node_id) ?;
1118
+ match self . channel_manager . close_channel ( channel_id, & counterparty_node_id) {
1119
1119
Ok ( _) => Ok ( ( ) ) ,
1120
1120
Err ( _) => Err ( Error :: ChannelClosingFailed ) ,
1121
1121
}
@@ -1277,7 +1277,7 @@ impl Node {
1277
1277
1278
1278
/// Send a spontaneous, aka. "keysend", payment
1279
1279
pub fn send_spontaneous_payment (
1280
- & self , amount_msat : u64 , node_id : & PublicKey ,
1280
+ & self , amount_msat : u64 , node_id : PublicKey ,
1281
1281
) -> Result < PaymentHash , Error > {
1282
1282
let rt_lock = self . runtime . read ( ) . unwrap ( ) ;
1283
1283
if rt_lock. is_none ( ) {
@@ -1289,7 +1289,7 @@ impl Node {
1289
1289
1290
1290
let route_params = RouteParameters {
1291
1291
payment_params : PaymentParameters :: from_node_id (
1292
- * node_id,
1292
+ node_id,
1293
1293
self . config . default_cltv_expiry_delta ,
1294
1294
) ,
1295
1295
final_value_msat : amount_msat,
0 commit comments