diff --git a/lightning/src/chain/channelmonitor.rs b/lightning/src/chain/channelmonitor.rs index 95d0b5f8a7b..9f12ff3dba3 100644 --- a/lightning/src/chain/channelmonitor.rs +++ b/lightning/src/chain/channelmonitor.rs @@ -3150,8 +3150,11 @@ impl ChannelMonitorImpl { panic!("Attempted to apply post-force-close ChannelMonitorUpdate that wasn't providing a payment preimage"); }, } - } else if self.latest_update_id + 1 != updates.update_id { - panic!("Attempted to apply ChannelMonitorUpdates out of order, check the update_id before passing an update to update_monitor!"); + } + if updates.update_id != LEGACY_CLOSED_CHANNEL_UPDATE_ID { + if self.latest_update_id + 1 != updates.update_id { + panic!("Attempted to apply ChannelMonitorUpdates out of order, check the update_id before passing an update to update_monitor!"); + } } let mut ret = Ok(()); let bounded_fee_estimator = LowerBoundedFeeEstimator::new(&**fee_estimator);