diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index 67ef521f219..7390191afcd 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -1730,23 +1730,26 @@ impl 1970").as_secs() - 6 * 3600; + let full_sync_threshold = SystemTime::now().duration_since(UNIX_EPOCH).expect("Time must be > 1970").as_secs() - 6 * 3600; + if (_msg.first_timestamp as u64) > full_sync_threshold { + should_do_full_sync = false; + } } - if (msg.first_timestamp as u64) <= full_sync_threshold { + if should_do_full_sync { peer_lock.sync_status = InitSyncTracker::ChannelsSyncing(0); } }