Skip to content

Commit f9c9acf

Browse files
committed
Add comment for skipping cleanup due to read error
1 parent c2fb98e commit f9c9acf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lightning/src/util/persist.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,7 @@ where
694694

695695
if let chain::ChannelMonitorUpdateStatus::Completed = monitor_update_status {
696696
let cleanup_range = if monitor.get_latest_update_id() == CLOSED_CHANNEL_UPDATE_ID {
697+
// If there is an error while reading old monitor, we skip clean up.
697698
maybe_old_monitor.map(|(_, ref old_monitor)| {
698699
let start = old_monitor.get_latest_update_id();
699700
// We never persist an update with update_id = CLOSED_CHANNEL_UPDATE_ID

0 commit comments

Comments
 (0)