Periodically refresh read transaction in backlog_population (#4329)

This commit is contained in:
Piotr Wójcik 2023-11-06 19:26:14 +01:00 committed by GitHub
commit 94d44c10f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;