Add vote_processor overflow mode (#1365)
This commit is contained in:
parent
1247e92f67
commit
f3c9ea72e6
1 changed files with 9 additions and 2 deletions
|
@ -888,8 +888,15 @@ void rai::vote_processor::vote (std::shared_ptr<rai::vote> vote_a, rai::endpoint
|
|||
std::lock_guard<std::mutex> lock (mutex);
|
||||
if (!stopped)
|
||||
{
|
||||
votes.push_back (std::make_pair (vote_a, endpoint_a));
|
||||
condition.notify_all ();
|
||||
if (votes.size () < 256 * 1024)
|
||||
{
|
||||
votes.push_back (std::make_pair (vote_a, endpoint_a));
|
||||
condition.notify_all ();
|
||||
}
|
||||
else if (node.config.logging.vote_logging ())
|
||||
{
|
||||
BOOST_LOG (node.log) << "Votes overflow";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue