From 5295cf63ea7a206f2f4ffc2e76a53d7cc05f7001 Mon Sep 17 00:00:00 2001 From: Sergey Kroshnin Date: Mon, 11 Nov 2019 21:35:14 +0300 Subject: [PATCH] Improve bootstrap for accounts with public key equal to existing block hash (#2400) --- nano/node/bootstrap/bootstrap_bulk_pull.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nano/node/bootstrap/bootstrap_bulk_pull.cpp b/nano/node/bootstrap/bootstrap_bulk_pull.cpp index c88a28a6..bff0c3ca 100644 --- a/nano/node/bootstrap/bootstrap_bulk_pull.cpp +++ b/nano/node/bootstrap/bootstrap_bulk_pull.cpp @@ -56,14 +56,14 @@ void nano::bulk_pull_client::request () assert (!pull.head.is_zero () || pull.retry_limit != std::numeric_limits::max ()); expected = pull.head; nano::bulk_pull req; - if (pull.head == pull.head_original) + if (pull.head == pull.head_original && pull.attempts % 4 < 3) { // Account for new pulls req.start = pull.account_or_head; } else { - // Head for cached pulls + // Head for cached pulls or accounts with public key equal to existing block hash (25% of attempts) req.start = pull.head; } req.end = pull.end;