Fix #29767, set m_synced = true after Commit()

Github-Pull: #29776
Rebased-From: bbe82c116e
This commit is contained in:
nanlour 2024-04-01 14:13:06 +11:00 committed by fanquake
parent ae9a2ed40a
commit 0fcceefe22
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -164,9 +164,9 @@ void BaseIndex::ThreadSync()
const CBlockIndex* pindex_next = NextSyncBlock(pindex, m_chainstate->m_chain);
if (!pindex_next) {
SetBestBlockIndex(pindex);
m_synced = true;
// No need to handle errors in Commit. See rationale above.
Commit();
m_synced = true;
break;
}
if (pindex_next->pprev != pindex && !Rewind(pindex, pindex_next->pprev)) {