From 167526a04e4f505effacd93898816d090d0f3580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Thu, 5 Sep 2024 11:19:17 +0200 Subject: [PATCH] Make election buckets always respect AEC vacancy --- nano/node/scheduler/bucket.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nano/node/scheduler/bucket.cpp b/nano/node/scheduler/bucket.cpp index f3e69383cd..f86fd4bf55 100644 --- a/nano/node/scheduler/bucket.cpp +++ b/nano/node/scheduler/bucket.cpp @@ -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; }