diff --git a/nano/node/unchecked_map.cpp b/nano/node/unchecked_map.cpp index 447d4e8b51..88e3cdb96f 100644 --- a/nano/node/unchecked_map.cpp +++ b/nano/node/unchecked_map.cpp @@ -52,6 +52,7 @@ void nano::unchecked_map::put (nano::hash_or_account const & dependency, nano::u { entries.get ().pop_front (); } + stats.inc (nano::stat::type::unchecked, nano::stat::detail::put); } @@ -107,14 +108,6 @@ std::size_t nano::unchecked_map::count () const return entries.size (); } -void nano::unchecked_map::flush () -{ - nano::unique_lock lock{ mutex }; - condition.wait (lock, [this] () { - return stopped || (buffer.empty () && back_buffer.empty () && !writing_back_buffer); - }); -} - void nano::unchecked_map::trigger (nano::hash_or_account const & dependency) { nano::unique_lock lock{ mutex }; @@ -149,7 +142,6 @@ void nano::unchecked_map::run () } else { - condition.notify_all (); // Notify flush () condition.wait (lock, [this] () { return stopped || !buffer.empty (); }); diff --git a/nano/node/unchecked_map.hpp b/nano/node/unchecked_map.hpp index 579c61c464..b6c904d4be 100644 --- a/nano/node/unchecked_map.hpp +++ b/nano/node/unchecked_map.hpp @@ -38,7 +38,6 @@ class unchecked_map void del (nano::unchecked_key const & key); void clear (); std::size_t count () const; - void flush (); /** * Trigger requested dependencies