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
//TODO: Determine whether to request a full sync based on the network map.
@@ -421,13 +424,12 @@ where C::Target: chain::Access, L::Target: Logger
421
424
// `gossip_timestamp_filter`, with the filter time set either two weeks ago or an hour ago.
422
425
//
423
426
// 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
427
#[allow(unused_mut, unused_assignments)]
426
428
letmut gossip_start_time = 0;
427
429
#[cfg(feature = "std")]
428
430
{
429
431
gossip_start_time = SystemTime::now().duration_since(UNIX_EPOCH).expect("Time must be > 1970").as_secs();
430
-
if should_request_full_sync {
432
+
ifself.should_request_full_sync(&their_node_id){
431
433
gossip_start_time -= 60*60*24*7*2;// 2 weeks ago
432
434
}else{
433
435
gossip_start_time -= 60*60;// an hour ago
@@ -1868,7 +1870,7 @@ mod tests {
1868
1870
use ln::PaymentHash;
1869
1871
use ln::features::{ChannelFeatures,InitFeatures,NodeFeatures};
1870
1872
use routing::gossip::{P2PGossipSync,NetworkGraph,NetworkUpdate,NodeAlias,MAX_EXCESS_BYTES_FOR_RELAY,NodeId,RoutingFees,ChannelUpdateInfo,ChannelInfo,NodeAnnouncementInfo,NodeInfo};
1871
-
use ln::msgs::{Init,RoutingMessageHandler,UnsignedNodeAnnouncement,NodeAnnouncement,
1873
+
use ln::msgs::{RoutingMessageHandler,UnsignedNodeAnnouncement,NodeAnnouncement,
0 commit comments