From 878e7a136027d17d28570129f0bd39f519f39cf3 Mon Sep 17 00:00:00 2001 From: gr0vity-dev <85646666+gr0vity-dev@users.noreply.github.com> Date: Sun, 22 Dec 2024 16:46:57 +0100 Subject: [PATCH] Do not add processed live traffic into priorities (#4801) - processed live traffic doesn't need bootstrapping Co-authored-by: gr0vity-dev --- 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 c2d8188249..c66e6e8f0f 100644 --- a/nano/node/bootstrap/bootstrap_service.cpp +++ b/nano/node/bootstrap/bootstrap_service.cpp @@ -271,17 +271,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;