merge bitcoin#25074: During sync, commit best block after indexing

This commit is contained in:
Kittywhiskers Van Gogh 2022-05-06 14:07:51 +02:00
parent e6867a35ce
commit a86109a017
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD

View File

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