Skip to content

Commit

Permalink
Periodically refresh read transaction in backlog_population (#4329)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Nov 6, 2023
1 parent c774654 commit 94d44c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nano/node/backlog_population.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ void nano::backlog_population::populate_backlog (nano::unique_lock<nano::mutex>
auto const end = store.account.end ();
for (; i != end && count < chunk_size; ++i, ++count, ++total)
{
transaction.refresh_if_needed ();

stats.inc (nano::stat::type::backlog, nano::stat::detail::total);

auto const & account = i->first;
Expand Down

0 comments on commit 94d44c1

Please sign in to comment.