Skip to content

Commit b6f3d0a

Browse files
authored
Merge pull request #2669 from benthecarman/trace-sync-progress
Remove channel monitor sync in progress log
2 parents b3e7aac + 439f916 commit b6f3d0a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lightning/src/chain/chainmonitor.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -814,12 +814,7 @@ where C::Target: chain::Filter,
814814
let mut pending_monitor_events = self.pending_monitor_events.lock().unwrap().split_off(0);
815815
for monitor_state in self.monitors.read().unwrap().values() {
816816
let is_pending_monitor_update = monitor_state.has_pending_chainsync_updates(&monitor_state.pending_monitor_updates.lock().unwrap());
817-
if is_pending_monitor_update &&
818-
monitor_state.last_chain_persist_height.load(Ordering::Acquire) + LATENCY_GRACE_PERIOD_BLOCKS as usize
819-
> self.highest_chain_height.load(Ordering::Acquire)
820-
{
821-
log_debug!(self.logger, "A Channel Monitor sync is still in progress, refusing to provide monitor events!");
822-
} else {
817+
if !is_pending_monitor_update || monitor_state.last_chain_persist_height.load(Ordering::Acquire) + LATENCY_GRACE_PERIOD_BLOCKS as usize <= self.highest_chain_height.load(Ordering::Acquire) {
823818
if is_pending_monitor_update {
824819
log_error!(self.logger, "A ChannelMonitor sync took longer than {} blocks to complete.", LATENCY_GRACE_PERIOD_BLOCKS);
825820
log_error!(self.logger, " To avoid funds-loss, we are allowing monitor updates to be released.");

0 commit comments

Comments
 (0)