@@ -953,7 +953,7 @@ impl Node {
953
953
///
954
954
/// Will also remove the peer from the peer store, i.e., after this has been called we won't
955
955
/// try to reconnect on restart.
956
- pub fn disconnect ( & self , counterparty_node_id : & PublicKey ) -> Result < ( ) , Error > {
956
+ pub fn disconnect ( & self , counterparty_node_id : PublicKey ) -> Result < ( ) , Error > {
957
957
let rt_lock = self . runtime . read ( ) . unwrap ( ) ;
958
958
if rt_lock. is_none ( ) {
959
959
return Err ( Error :: NotRunning ) ;
@@ -968,7 +968,7 @@ impl Node {
968
968
}
969
969
}
970
970
971
- self . peer_manager . disconnect_by_node_id ( * counterparty_node_id) ;
971
+ self . peer_manager . disconnect_by_node_id ( counterparty_node_id) ;
972
972
Ok ( ( ) )
973
973
}
974
974
@@ -1126,10 +1126,10 @@ impl Node {
1126
1126
1127
1127
/// Close a previously opened channel.
1128
1128
pub fn close_channel (
1129
- & self , channel_id : & ChannelId , counterparty_node_id : & PublicKey ,
1129
+ & self , channel_id : & ChannelId , counterparty_node_id : PublicKey ,
1130
1130
) -> Result < ( ) , Error > {
1131
- self . peer_store . remove_peer ( counterparty_node_id) ?;
1132
- match self . channel_manager . close_channel ( & channel_id. 0 , counterparty_node_id) {
1131
+ self . peer_store . remove_peer ( & counterparty_node_id) ?;
1132
+ match self . channel_manager . close_channel ( & channel_id. 0 , & counterparty_node_id) {
1133
1133
Ok ( _) => Ok ( ( ) ) ,
1134
1134
Err ( _) => Err ( Error :: ChannelClosingFailed ) ,
1135
1135
}
@@ -1291,7 +1291,7 @@ impl Node {
1291
1291
1292
1292
/// Send a spontaneous, aka. "keysend", payment
1293
1293
pub fn send_spontaneous_payment (
1294
- & self , amount_msat : u64 , node_id : & PublicKey ,
1294
+ & self , amount_msat : u64 , node_id : PublicKey ,
1295
1295
) -> Result < PaymentHash , Error > {
1296
1296
let rt_lock = self . runtime . read ( ) . unwrap ( ) ;
1297
1297
if rt_lock. is_none ( ) {
@@ -1303,7 +1303,7 @@ impl Node {
1303
1303
1304
1304
let route_params = RouteParameters {
1305
1305
payment_params : PaymentParameters :: from_node_id (
1306
- * node_id,
1306
+ node_id,
1307
1307
self . config . default_cltv_expiry_delta ,
1308
1308
) ,
1309
1309
final_value_msat : amount_msat,
0 commit comments