Skip to content

Commit 5b71cd9

Browse files
committed
f also assert closing updates are closing
1 parent a6d4676 commit 5b71cd9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5633,8 +5633,18 @@ where
56335633
} else { false }
56345634
},
56355635
// or the channel we'd unblock is already closed,
5636-
BackgroundEvent::ClosedMonitorUpdateRegeneratedOnStartup((funding_txo, ..))
5637-
=> *funding_txo == next_channel_outpoint,
5636+
BackgroundEvent::ClosedMonitorUpdateRegeneratedOnStartup(
5637+
(funding_txo, monitor_update)
5638+
) => {
5639+
if *funding_txo == next_channel_outpoint {
5640+
assert_eq!(monitor_update.updates.len(), 1);
5641+
assert!(matches!(
5642+
monitor_update.updates[0],
5643+
ChannelMonitorUpdateStep::ChannelForceClosed { .. }
5644+
));
5645+
true
5646+
} else { false }
5647+
},
56385648
// or the monitor update has completed and will unblock
56395649
// immediately once we get going.
56405650
BackgroundEvent::MonitorUpdatesComplete {

0 commit comments

Comments
 (0)