Skip to content

Commit

Permalink
GH-3 Optimization: Don't emit duplicate votes
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Apr 11, 2024
1 parent da0106b commit bf545e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libraries/chain/include/eosio/chain/vote_processor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ class vote_processor_t {
for (auto& vptr : to_process) {
boost::asio::post(thread_pool.get_executor(), [this, bsp, vptr=std::move(vptr)]() {
vote_status s = bsp->aggregate_vote(vptr->msg);
emit(vptr->connection_id, s, vptr->msg);
if (s != vote_status::duplicate) { // don't bother emitting duplicates
emit(vptr->connection_id, s, vptr->msg);
}
});
}
if (should_break)
Expand Down

0 comments on commit bf545e3

Please sign in to comment.