mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-01-12 22:43:42 +08:00
fix: when in IBD, be aggressive about neighbor walks (since inv sync depends on bootstrap nodes staying connected)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user