Skip to content

Commit ecb44f4

Browse files
committed
f debug_assert false unreachable non-existence
1 parent a68d556 commit ecb44f4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3567,8 +3567,12 @@ where
35673567
} else if let Some(channel) = peer_state.outbound_v1_channel_by_id.get_mut(channel_id) {
35683568
&mut channel.context
35693569
} else {
3570+
// This should not be reachable as we've already checked for non-existence in the previous channel_id loop.
3571+
debug_assert!(false);
35703572
return Err(APIError::ChannelUnavailable {
3571-
err: format!("Channel with ID {} was not found for the passed counterparty_node_id {}", log_bytes!(*channel_id), counterparty_node_id),
3573+
err: format!(
3574+
"Channel with ID {} for passed counterparty_node_id {} disappeared after we confirmed its existence - this should not be reachable!",
3575+
log_bytes!(*channel_id), counterparty_node_id),
35723576
});
35733577
};
35743578
let mut config = context.config();

0 commit comments

Comments
 (0)