From a86109a017577891382fc1f366e553506e1a0a28 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Fri, 6 May 2022 14:07:51 +0200 Subject: [PATCH] merge bitcoin#25074: During sync, commit best block after indexing --- src/index/base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index/base.cpp b/src/index/base.cpp index 0aa4b8cd58..376d0314ca 100644 --- a/src/index/base.cpp +++ b/src/index/base.cpp @@ -168,7 +168,7 @@ void BaseIndex::ThreadSync() } if (last_locator_write_time + SYNC_LOCATOR_WRITE_INTERVAL < current_time) { - SetBestBlockIndex(pindex); + SetBestBlockIndex(pindex->pprev); last_locator_write_time = current_time; // No need to handle errors in Commit. See rationale above. Commit();