Skip to content

Commit e1e3819

Browse files
authored
Merge pull request #2172 from TheBlueMatt/2023-04-fix-panicy-debug-assert
Remove a race-y debug assertion in new channel update handling
2 parents accfdae + 29f8026 commit e1e3819

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/channelmanager.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ macro_rules! handle_new_monitor_update {
15881588
($self: ident, $update_res: expr, $update_id: expr, $peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan: expr, MANUALLY_REMOVING, $remove: expr) => { {
15891589
// update_maps_on_chan_removal needs to be able to take id_to_peer, so make sure we can in
15901590
// any case so that it won't deadlock.
1591-
debug_assert!($self.id_to_peer.try_lock().is_ok());
1591+
debug_assert_ne!($self.id_to_peer.held_by_thread(), LockHeldState::HeldByThread);
15921592
match $update_res {
15931593
ChannelMonitorUpdateStatus::InProgress => {
15941594
log_debug!($self.logger, "ChannelMonitor update for {} in flight, holding messages until the update completes.",

0 commit comments

Comments
 (0)