Skip to content

Commit

Permalink
Disable vote rebroadcasting until cemented count reaches hardcoded bo…
Browse files Browse the repository at this point in the history
…otstrap block count
  • Loading branch information
guilhermelawless committed Nov 25, 2019
1 parent 809deaa commit c6e4c41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nano/node/active_transactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ bool nano::active_transactions::vote (std::shared_ptr<nano::vote> vote_a, bool s
{
lock = nano::unique_lock<std::mutex> (mutex);
}
for (auto vote_block : vote_a->blocks)
for (auto & vote_block : vote_a->blocks)
{
nano::election_vote_result result;
if (vote_block.which ())
Expand Down Expand Up @@ -725,7 +725,7 @@ bool nano::active_transactions::vote (std::shared_ptr<nano::vote> vote_a, bool s
processed = processed || result.processed;
}
}
if (processed)
if (processed && node.ledger.cemented_count >= node.ledger.bootstrap_weight_max_blocks)
{
node.network.flood_vote (vote_a);
}
Expand Down

0 comments on commit c6e4c41

Please sign in to comment.