Skip to content

Commit 9018b0c

Browse files
committed
f explain why the assertions are there
1 parent e057746 commit 9018b0c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,6 +1706,10 @@ macro_rules! process_events_body {
17061706
$event_to_handle = event;
17071707
$handle_event;
17081708
let mut pending_events = $self.pending_events.lock().unwrap();
1709+
// We're required to take the `pending_events_processor` lock any time we
1710+
// change `pending_events`, however have no general way to enforce that.
1711+
// Instead, here, we assert that the next event hasn't changed out from under
1712+
// us.
17091713
#[cfg(debug_assertions)] {
17101714
debug_assert_eq!(_ev_clone, pending_events.front().unwrap().0);
17111715
}

0 commit comments

Comments
 (0)