Skip to content

Commit

Permalink
Make election buckets always respect AEC vacancy
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Sep 5, 2024
1 parent d631c02 commit 167526a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions nano/node/scheduler/bucket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ bool nano::scheduler::bucket::election_vacancy (priority_t candidate) const
{
debug_assert (!mutex.try_lock ());

if (elections.size () < config.reserved_elections)
{
return true;
}
if (elections.size () < config.max_elections)
if (elections.size () < config.reserved_elections || elections.size () < config.max_elections)
{
return active.vacancy (nano::election_behavior::priority) > 0;
}
Expand Down

0 comments on commit 167526a

Please sign in to comment.