mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-28 06:50:38 +01:00
bugfix: correct is_snapshot_cs in VerifyDB
This commit is contained in:
@@ -4281,7 +4281,7 @@ VerifyDBResult CVerifyDB::VerifyDB(
|
|||||||
bool skipped_l3_checks{false};
|
bool skipped_l3_checks{false};
|
||||||
LogPrintf("Verification progress: 0%%\n");
|
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) {
|
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))));
|
const int percentageDone = std::max(1, std::min(99, (int)(((double)(chainstate.m_chain.Height() - pindex->nHeight)) / (double)nCheckDepth * (nCheckLevel >= 4 ? 50 : 100))));
|
||||||
|
|||||||
Reference in New Issue
Block a user