From: Antoine Riard Date: Tue, 13 Jul 2021 16:59:39 +0000 (-0400) Subject: Add `pending_events` deadlock detection in `handle_error` X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=4be201641d262deca678ded5772fdc51cfa86b3e;p=rust-lightning Add `pending_events` deadlock detection in `handle_error` --- diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index dcc80382c..9e0f69dff 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -824,6 +824,7 @@ macro_rules! handle_error { // In testing, ensure there are no deadlocks where the lock is already held upon // entering the macro. assert!($self.channel_state.try_lock().is_ok()); + assert!($self.pending_events.try_lock().is_ok()); } let mut msg_events = Vec::with_capacity(2);