Skip to content

Commit

Permalink
Add comment for skipping cleanup due to read error
Browse files Browse the repository at this point in the history
  • Loading branch information
G8XSU committed Dec 13, 2023
1 parent c2fb98e commit f9c9acf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lightning/src/util/persist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f9c9acf

Please sign in to comment.