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