From: Antoine Riard Date: Tue, 13 Jul 2021 16:59:39 +0000 (-0400) Subject: Add `pending_events` deadlock detection in `handle_error` X-Git-Tag: v0.0.101~11^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=d13c5cfa3078e874e0fa18ad951233cb1ae85326;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 ebffe5c0a..56dcb057d 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);