From a8262061c9c4832269172b05e956f4b4174d902d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Thu, 22 Sep 2022 19:15:38 +0200 Subject: [PATCH] Replace random_access with sequenced in `vote_cache` --- nano/node/vote_cache.cpp | 4 ++-- nano/node/vote_cache.hpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nano/node/vote_cache.cpp b/nano/node/vote_cache.cpp index d9be32dbb1..1357ebad71 100644 --- a/nano/node/vote_cache.cpp +++ b/nano/node/vote_cache.cpp @@ -231,11 +231,11 @@ void nano::vote_cache::trim_overflow_locked () // When cache overflown remove the oldest entry if (cache.size () > max_size) { - cache.get ().pop_front (); + cache.get ().pop_front (); } if (queue.size () > max_size) { - queue.get ().pop_front (); + queue.get ().pop_front (); } } diff --git a/nano/node/vote_cache.hpp b/nano/node/vote_cache.hpp index b8bf156d21..379f008bb1 100644 --- a/nano/node/vote_cache.hpp +++ b/nano/node/vote_cache.hpp @@ -142,7 +142,7 @@ class vote_cache final const std::size_t max_size; // clang-format off - class tag_random_access {}; + class tag_sequenced {}; class tag_tally {}; class tag_hash {}; // clang-format on @@ -150,7 +150,7 @@ class vote_cache final // clang-format off using ordered_cache = boost::multi_index_container>, + mi::sequenced>, mi::hashed_unique, mi::member>>>; // clang-format on @@ -159,7 +159,7 @@ class vote_cache final // clang-format off using ordered_queue = boost::multi_index_container>, + mi::sequenced>, mi::ordered_non_unique, mi::member>, mi::hashed_unique,