diff --git a/lightning/src/util/persist.rs b/lightning/src/util/persist.rs index fda08376f40..e6329062051 100644 --- a/lightning/src/util/persist.rs +++ b/lightning/src/util/persist.rs @@ -694,6 +694,7 @@ where if let chain::ChannelMonitorUpdateStatus::Completed = monitor_update_status { let cleanup_range = if monitor.get_latest_update_id() == CLOSED_CHANNEL_UPDATE_ID { + // If there is an error while reading old monitor, we skip clean up. maybe_old_monitor.map(|(_, ref old_monitor)| { let start = old_monitor.get_latest_update_id(); // We never persist an update with update_id = CLOSED_CHANNEL_UPDATE_ID