Browse Source

nCheckDepth chain height fix

0.15
romanornr 7 years ago
parent
commit
d9d1bd3267
No known key found for this signature in database
GPG Key ID: 3F92368F0D21A206
  1. 4
      src/validation.cpp

4
src/validation.cpp

@ -3577,9 +3577,7 @@ bool CVerifyDB::VerifyDB(const CChainParams& chainparams, CCoinsView *coinsview,
return true; return true;
// Verify blocks in the best chain // Verify blocks in the best chain
if (nCheckDepth <= 0) if (nCheckDepth <= 0 || nCheckDepth > chainActive.Height())
nCheckDepth = 1000000000; // suffices until the year 19000
if (nCheckDepth > chainActive.Height())
nCheckDepth = chainActive.Height(); nCheckDepth = chainActive.Height();
nCheckLevel = std::max(0, std::min(4, nCheckLevel)); nCheckLevel = std::max(0, std::min(4, nCheckLevel));
LogPrintf("Verifying last %i blocks at level %i\n", nCheckDepth, nCheckLevel); LogPrintf("Verifying last %i blocks at level %i\n", nCheckDepth, nCheckLevel);

Loading…
Cancel
Save