Skip to content

Commit

Permalink
CLEANUP
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Mar 7, 2024
1 parent d4a3451 commit 3626dbf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions nano/node/vote_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,6 @@ bool nano::vote_processor::empty () const
return votes.empty ();
}

bool nano::vote_processor::half_full () const
{
return size () >= max_votes / 2;
}

void nano::vote_processor::calculate_weights ()
{
nano::unique_lock<nano::mutex> lock{ mutex };
Expand Down
4 changes: 2 additions & 2 deletions nano/node/vote_processor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ class vote_processor final
bool vote (std::shared_ptr<nano::vote> const &, std::shared_ptr<nano::transport::channel> const &);
/** Note: node.active.mutex lock is required */
nano::vote_code vote_blocking (std::shared_ptr<nano::vote> const &, std::shared_ptr<nano::transport::channel> const &, bool = false);
void verify_votes (std::deque<std::pair<std::shared_ptr<nano::vote>, std::shared_ptr<nano::transport::channel>>> const &);

/** Function blocks until either the current queue size (a established flush boundary as it'll continue to increase)
* is processed or the queue is empty (end condition or cutoff's guard, as it is positioned ahead) */
void flush ();
std::size_t size () const;
bool empty () const;
bool half_full () const;
void calculate_weights ();

std::atomic<uint64_t> total_processed{ 0 };
Expand All @@ -76,6 +75,7 @@ class vote_processor final

private:
void run ();
void verify_votes (std::deque<std::pair<std::shared_ptr<nano::vote>, std::shared_ptr<nano::transport::channel>>> const &);

private:
// Higher number means higher priority
Expand Down

0 comments on commit 3626dbf

Please sign in to comment.