From 752fc07d7889d6b860f90d69f6654da26222af9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Thu, 22 Sep 2022 22:13:06 +0200 Subject: [PATCH] Replace random_access with sequenced in `vote_cache` (#3955) --- 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 d9be32db..1357ebad 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 b8bf156d..379f008b 100644 --- a/nano/node/vote_cache.hpp +++ b/nano/node/vote_cache.hpp @@ -142,7 +142,7 @@ private: 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 @@ private: // clang-format off using ordered_cache = boost::multi_index_container>, + mi::sequenced>, mi::hashed_unique, mi::member>>>; // clang-format on @@ -159,7 +159,7 @@ private: // clang-format off using ordered_queue = boost::multi_index_container>, + mi::sequenced>, mi::ordered_non_unique, mi::member>, mi::hashed_unique,