bugfix: correct is_snapshot_cs in VerifyDB

This commit is contained in:
James O'Beirne 2023-05-24 21:10:12 -04:00
parent b73d3bbd23
commit c93ef43e4f

View file

@ -4281,7 +4281,7 @@ VerifyDBResult CVerifyDB::VerifyDB(
bool skipped_l3_checks{false};
LogPrintf("Verification progress: 0%%\n");
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))));