Skip to content

Commit

Permalink
Improve backlog_index::next ()
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Nov 28, 2024
1 parent cefc1ee commit 1c6594a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nano/node/bounded_backlog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,9 @@ std::deque<nano::block_hash> nano::backlog_index::next (nano::block_hash last, s
auto it = blocks.get<tag_hash_ordered> ().upper_bound (last);
auto end = blocks.get<tag_hash_ordered> ().end ();

while (it != end && results.size () < count)
for (; it != end && results.size () < count; ++it)
{
results.push_back (it->hash);
last = it->hash;
it = blocks.get<tag_hash_ordered> ().upper_bound (last);
}
return results;
}
Expand Down

0 comments on commit 1c6594a

Please sign in to comment.