From d9d1bd3267cf0f9fc6f56250bd8cd3af7596c11e Mon Sep 17 00:00:00 2001 From: romanornr Date: Sat, 8 Jul 2017 18:44:03 +0200 Subject: nCheckDepth chain height fix --- src/validation.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 09288be1ca..4831e819d7 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -3577,9 +3577,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); -- cgit v1.2.3