From 0fd46961ff2086396d2701b47814ed8fe6f6aa60 Mon Sep 17 00:00:00 2001 From: Sergey Kroshnin Date: Mon, 29 Jun 2020 17:44:47 +0300 Subject: [PATCH] Fix requeue pull for lazy bootstrap (#2825) It should not allow unlimited requeue, instead check if new pull head was already processed --- nano/node/bootstrap/bootstrap_connections.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nano/node/bootstrap/bootstrap_connections.cpp b/nano/node/bootstrap/bootstrap_connections.cpp index c8448131..80fd2d72 100644 --- a/nano/node/bootstrap/bootstrap_connections.cpp +++ b/nano/node/bootstrap/bootstrap_connections.cpp @@ -404,7 +404,7 @@ void nano::bootstrap_connections::requeue_pull (nano::pull_info const & pull_a, { pull.count = attempt_l->lazy_batch_size (); } - if (pull.attempts < pull.retry_limit + (pull.processed / nano::bootstrap_limits::requeued_pulls_processed_blocks_factor)) + if (attempt_l->mode == nano::bootstrap_mode::legacy && (pull.attempts < pull.retry_limit + (pull.processed / nano::bootstrap_limits::requeued_pulls_processed_blocks_factor))) { { nano::lock_guard lock (mutex);