]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Add `pending_events` deadlock detection in `handle_error`
authorAntoine Riard <dev@ariard.me>
Tue, 13 Jul 2021 16:59:39 +0000 (12:59 -0400)
committerAntoine Riard <dev@ariard.me>
Tue, 21 Sep 2021 19:46:42 +0000 (15:46 -0400)
lightning/src/ln/channelmanager.rs

index ebffe5c0af988a6b180d5909f90d256bdad37aac..56dcb057ddf10af8106f24904f05f849840c7c21 100644 (file)
@@ -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);