@@ -1725,22 +1725,22 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
1725
1725
// When supporting gossip messages, start initial gossip sync only after we receive
1726
1726
// a GossipTimestampFilter
1727
1727
1728
- #[ allow( unused_mut, unused_assignments) ]
1729
- let mut full_sync_threshold = 0 ;
1730
- #[ cfg( feature = "std" ) ]
1731
- {
1732
- // if the timestamp range starts more than an hour ago, do a fully sync
1733
- // otherwise, start at the current time
1734
- use std:: time:: { SystemTime , UNIX_EPOCH } ;
1735
- full_sync_threshold = SystemTime :: now ( ) . duration_since ( UNIX_EPOCH ) . expect ( "Time must be > 1970" ) . as_secs ( ) - 3600 ;
1736
- }
1737
-
1738
1728
if peer_lock. their_features . as_ref ( ) . unwrap ( ) . supports_gossip_queries ( ) &&
1739
- !peer_lock. sent_gossip_timestamp_filter &&
1740
- ( msg. first_timestamp as u64 ) <= full_sync_threshold
1741
- {
1729
+ !peer_lock. sent_gossip_timestamp_filter {
1742
1730
peer_lock. sent_gossip_timestamp_filter = true ;
1743
- peer_lock. sync_status = InitSyncTracker :: ChannelsSyncing ( 0 ) ;
1731
+
1732
+ #[ allow( unused_mut, unused_assignments) ]
1733
+ let mut full_sync_threshold = 0 ;
1734
+ #[ cfg( feature = "std" ) ]
1735
+ {
1736
+ // if the timestamp range starts more than an hour ago, do a fully sync
1737
+ // otherwise, start at the current time
1738
+ use std:: time:: { SystemTime , UNIX_EPOCH } ;
1739
+ full_sync_threshold = SystemTime :: now ( ) . duration_since ( UNIX_EPOCH ) . expect ( "Time must be > 1970" ) . as_secs ( ) - 3600 ;
1740
+ }
1741
+ if ( msg. first_timestamp as u64 ) <= full_sync_threshold {
1742
+ peer_lock. sync_status = InitSyncTracker :: ChannelsSyncing ( 0 ) ;
1743
+ }
1744
1744
}
1745
1745
return Ok ( None ) ;
1746
1746
}
0 commit comments