Skip to content

Commit

Permalink
Deprioritize synced accounts faster
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Dec 10, 2024
1 parent fc274ad commit b927ce9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions nano/node/bootstrap/bootstrap_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,13 +845,18 @@ bool nano::bootstrap_service::process (const nano::asc_pull_ack::blocks_payload
case verify_result::nothing_new:
{
stats.inc (nano::stat::type::bootstrap_verify_blocks, nano::stat::detail::nothing_new);

nano::lock_guard<nano::mutex> lock{ mutex };
accounts.priority_down (tag.account);
if (tag.source == query_source::database)
{
throttle.add (false);
nano::lock_guard<nano::mutex> lock{ mutex };

accounts.priority_down (tag.account);
accounts.timestamp_reset (tag.account);

if (tag.source == query_source::database)
{
throttle.add (false);
}
}
condition.notify_all ();
}
break;
case verify_result::invalid:
Expand Down

0 comments on commit b927ce9

Please sign in to comment.