fix: when in IBD, be aggressive about neighbor walks (since inv sync depends on bootstrap nodes staying connected)

This commit is contained in:
jude
2024-05-09 12:54:17 -04:00
parent 4cee411521
commit eb78eb0dd7

View File

@@ -305,16 +305,13 @@ impl PeerNetwork {
// time to do a walk yet?
if (self.walk_count > self.connection_opts.num_initial_walks
|| self.walk_retries > self.connection_opts.walk_retry_count)
&& self.walk_deadline > get_epoch_time_secs()
&& (!ibd && self.walk_deadline > get_epoch_time_secs())
{
// we've done enough walks for an initial mixing, or we can't connect to anyone,
// so throttle ourselves down until the walk deadline passes.
test_debug!(
debug!(
"{:?}: Throttle walk until {} to walk again (walk count: {}, walk retries: {})",
&self.local_peer,
self.walk_deadline,
self.walk_count,
self.walk_retries
&self.local_peer, self.walk_deadline, self.walk_count, self.walk_retries
);
return false;
}