You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lightning/src/routing/gossip.rs
+3-3
Original file line number
Diff line number
Diff line change
@@ -421,13 +421,12 @@ where C::Target: chain::Access, L::Target: Logger
421
421
// `gossip_timestamp_filter`, with the filter time set either two weeks ago or an hour ago.
422
422
//
423
423
// For no-std builds, we bury our head in the sand and do a full sync on each connection.
424
-
let should_request_full_sync = self.should_request_full_sync(&their_node_id);
425
424
#[allow(unused_mut, unused_assignments)]
426
425
letmut gossip_start_time = 0;
427
426
#[cfg(feature = "std")]
428
427
{
429
428
gossip_start_time = SystemTime::now().duration_since(UNIX_EPOCH).expect("Time must be > 1970").as_secs();
430
-
if should_request_full_sync {
429
+
ifself.should_request_full_sync(&their_node_id){
431
430
gossip_start_time -= 60*60*24*7*2;// 2 weeks ago
432
431
}else{
433
432
gossip_start_time -= 60*60;// an hour ago
@@ -1856,7 +1855,7 @@ mod tests {
1856
1855
use ln::PaymentHash;
1857
1856
use ln::features::{ChannelFeatures,InitFeatures,NodeFeatures};
1858
1857
use routing::gossip::{P2PGossipSync,NetworkGraph,NetworkUpdate,NodeAlias,MAX_EXCESS_BYTES_FOR_RELAY,NodeId,RoutingFees,ChannelUpdateInfo,ChannelInfo,NodeAnnouncementInfo,NodeInfo};
1859
-
use ln::msgs::{Init,RoutingMessageHandler,UnsignedNodeAnnouncement,NodeAnnouncement,
1858
+
use ln::msgs::{RoutingMessageHandler,UnsignedNodeAnnouncement,NodeAnnouncement,
0 commit comments