|
|
|
@ -3871,6 +3871,11 @@ bool CVerifyDB::VerifyDB(const CChainParams& chainparams, CCoinsView *coinsview,
@@ -3871,6 +3871,11 @@ bool CVerifyDB::VerifyDB(const CChainParams& chainparams, CCoinsView *coinsview,
|
|
|
|
|
uiInterface.ShowProgress(_("Verifying blocks..."), std::max(1, std::min(99, (int)(((double)(chainActive.Height() - pindex->nHeight)) / (double)nCheckDepth * (nCheckLevel >= 4 ? 50 : 100))))); |
|
|
|
|
if (pindex->nHeight < chainActive.Height()-nCheckDepth) |
|
|
|
|
break; |
|
|
|
|
if (fPruneMode && !(pindex->nStatus & BLOCK_HAVE_DATA)) { |
|
|
|
|
// If pruning, only go back as far as we have data.
|
|
|
|
|
LogPrintf("VerifyDB(): block verification stopping at height %d (pruning, no data)\n", pindex->nHeight); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
CBlock block; |
|
|
|
|
// check level 0: read from disk
|
|
|
|
|
if (!ReadBlockFromDisk(block, pindex, chainparams.GetConsensus())) |
|
|
|
|