fix: correct is_snapshot_cs in VerifyDB

Similar changes in bitcoin/bitcoin#27596: assumeutxo (2)
This commit is contained in:
James O'Beirne 2023-05-24 21:10:12 -04:00 committed by Konstantin Akimov
parent df07c38151
commit bf377d47e5
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524

View File

@ -4063,7 +4063,7 @@ bool CVerifyDB::VerifyDB(
int reportDone = 0;
LogPrintf("[0%%]..."); /* Continued */
const bool is_snapshot_cs{!chainstate.m_from_snapshot_blockhash};
const bool is_snapshot_cs{chainstate.m_from_snapshot_blockhash};
for (pindex = chainstate.m_chain.Tip(); pindex && pindex->pprev; pindex = pindex->pprev) {
const int percentageDone = std::max(1, std::min(99, (int)(((double)(chainstate.m_chain.Height() - pindex->nHeight)) / (double)nCheckDepth * (nCheckLevel >= 4 ? 50 : 100))));