You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove unnecessary return value from force_close_channel_with_peer
`ChannelManager::force_close_channel_with_peer` takes the peer's
node_id as a parameter and then returns it, presumably leftover
from before we stored channels indexed by peers.
Here we simply drop the return value.
// N.B. that we don't send any channel close event here: we
4405
4405
// don't have a user_channel_id, and we never sent any opening
4406
4406
// events anyway.
4407
-
(None, *peer_node_id)
4407
+
None
4408
4408
} else {
4409
4409
return Err(APIError::ChannelUnavailable{ err: format!("Channel with id {} not found for the passed counterparty node_id {}", channel_id, peer_node_id) });
4410
4410
}
@@ -4416,8 +4416,7 @@ where
4416
4416
msg: update
4417
4417
});
4418
4418
}
4419
-
4420
-
Ok(counterparty_node_id)
4419
+
Ok(())
4421
4420
}
4422
4421
4423
4422
#[rustfmt::skip]
@@ -4427,13 +4426,13 @@ where
4427
4426
log_debug!(self.logger,
4428
4427
"Force-closing channel, The error message sent to the peer : {}", error_message);
4429
4428
match self.force_close_channel_with_peer(channel_id, &counterparty_node_id, None, broadcast) {
4430
-
Ok(counterparty_node_id) => {
4429
+
Ok(()) => {
4431
4430
let per_peer_state = self.per_peer_state.read().unwrap();
4432
-
if let Some(peer_state_mutex) = per_peer_state.get(&counterparty_node_id) {
4431
+
if let Some(peer_state_mutex) = per_peer_state.get(counterparty_node_id) {
4433
4432
let mut peer_state = peer_state_mutex.lock().unwrap();
0 commit comments