diff options
| author | Suhas Daftuar <[email protected]> | 2016-05-20 04:59:57 -0400 |
|---|---|---|
| committer | Suhas Daftuar <[email protected]> | 2016-05-22 09:15:21 -0400 |
| commit | bd477f4e8ba9e632f42649f2fca10d698c6b7181 (patch) | |
| tree | 18410f9b3ec5dc9b0e1ad7f6a2538c40f4e1825c /src/main.cpp | |
| parent | Merge #8072: travis: 'make check' in parallel and verbose (diff) | |
| download | discoin-bd477f4e8ba9e632f42649f2fca10d698c6b7181.tar.xz discoin-bd477f4e8ba9e632f42649f2fca10d698c6b7181.zip | |
VerifyDB: don't check blocks that have been pruned
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9ba90b4ea..33abf3957 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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())) |