Skip to content

Commit

Permalink
Common subexpression elimination.
Browse files Browse the repository at this point in the history
  • Loading branch information
clemahieu committed May 17, 2024
1 parent 344e82f commit 5e5cd37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nano/node/vote_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,12 @@ std::vector<nano::vote_cache::top_entry> nano::vote_cache::top (const nano::uint

for (auto & entry : cache.get<tag_tally> ())
{
if (entry.tally () < min_tally)
auto tally = entry.tally ();
if (tally < min_tally)
{
break;
}
results.push_back ({ entry.hash (), entry.tally (), entry.final_tally () });
results.push_back ({ entry.hash (), tally, entry.final_tally () });
}
}

Expand Down

0 comments on commit 5e5cd37

Please sign in to comment.