aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/validation.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index d7d880d24f..9a00203e8f 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -3573,9 +3573,7 @@ bool CVerifyDB::VerifyDB(const CChainParams& chainparams, CCoinsView *coinsview,
return true;
// Verify blocks in the best chain
- if (nCheckDepth <= 0)
- nCheckDepth = 1000000000; // suffices until the year 19000
- if (nCheckDepth > chainActive.Height())
+ if (nCheckDepth <= 0 || nCheckDepth > chainActive.Height())
nCheckDepth = chainActive.Height();
nCheckLevel = std::max(0, std::min(4, nCheckLevel));
LogPrintf("Verifying last %i blocks at level %i\n", nCheckDepth, nCheckLevel);