]> 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>
Fri, 17 Sep 2021 22:41:19 +0000 (18:41 -0400)
lightning/src/ln/channelmanager.rs

index dcc80382c33a9ea9728ba4eb4a3a3c96d95472d6..9e0f69dff05d995c808f329cf7f56919233909b0 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);