Skip to content

Commit

Permalink
Remove flush function
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Apr 18, 2024
1 parent f0646f2 commit 7d57781
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
10 changes: 1 addition & 9 deletions nano/node/unchecked_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ void nano::unchecked_map::put (nano::hash_or_account const & dependency, nano::u
{
entries.get<tag_sequenced> ().pop_front ();
}

stats.inc (nano::stat::type::unchecked, nano::stat::detail::put);
}

Expand Down Expand Up @@ -107,14 +108,6 @@ std::size_t nano::unchecked_map::count () const
return entries.size ();
}

void nano::unchecked_map::flush ()
{
nano::unique_lock<nano::mutex> 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<nano::mutex> lock{ mutex };
Expand Down Expand Up @@ -149,7 +142,6 @@ void nano::unchecked_map::run ()
}
else
{
condition.notify_all (); // Notify flush ()
condition.wait (lock, [this] () {
return stopped || !buffer.empty ();
});
Expand Down
1 change: 0 additions & 1 deletion nano/node/unchecked_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7d57781

Please sign in to comment.