Skip to content

Commit

Permalink
Do not add processed live traffic into priorities (#4801)
Browse files Browse the repository at this point in the history
- processed live traffic doesn't need bootstrapping

Co-authored-by: gr0vity-dev <homebot@users.noreply.github.com>
  • Loading branch information
gr0vity-dev and gr0vity-dev authored Dec 22, 2024
1 parent f27a407 commit 878e7a1
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions nano/node/bootstrap/bootstrap_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 878e7a1

Please sign in to comment.