From 83563b3fbe2824df653f8a08c4b3e4e98037a144 Mon Sep 17 00:00:00 2001 From: gr0vity-dev Date: Tue, 3 Dec 2024 07:53:50 +0100 Subject: [PATCH] Do not add processed live traffic into priorities - processed live traffic doesn't need bootstrapping --- nano/node/bootstrap/bootstrap_service.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/nano/node/bootstrap/bootstrap_service.cpp b/nano/node/bootstrap/bootstrap_service.cpp index e6a2295cb8..17ad06bda9 100644 --- a/nano/node/bootstrap/bootstrap_service.cpp +++ b/nano/node/bootstrap/bootstrap_service.cpp @@ -254,17 +254,21 @@ void nano::bootstrap_service::inspect (secure::transaction const & tx, nano::blo { case nano::block_status::progress: { - const auto account = block.account (); + // Progress blocks from live traffic don't need further bootstrapping + if (source != nano::block_source::live) + { + const auto account = block.account (); - // If we've inserted any block in to an account, unmark it as blocked - accounts.unblock (account); - accounts.priority_up (account); + // If we've inserted any block in to an account, unmark it as blocked + accounts.unblock (account); + accounts.priority_up (account); - if (block.is_send ()) - { - auto destination = block.destination (); - accounts.unblock (destination, hash); // Unblocking automatically inserts account into priority set - accounts.priority_set (destination); + if (block.is_send ()) + { + auto destination = block.destination (); + accounts.unblock (destination, hash); // Unblocking automatically inserts account into priority set + accounts.priority_set (destination); + } } } break;