diff options
| author | romanornr <[email protected]> | 2017-07-08 18:44:03 +0200 |
|---|---|---|
| committer | romanornr <[email protected]> | 2017-07-08 19:49:11 +0200 |
| commit | d9d1bd3267cf0f9fc6f56250bd8cd3af7596c11e (patch) | |
| tree | f73b938f34145b32b020285e27698b1977d0d2c6 /src/validation.cpp | |
| parent | Merge #10759: Fix multi_rpc test for hosts that dont default to utf8 (diff) | |
| download | discoin-d9d1bd3267cf0f9fc6f56250bd8cd3af7596c11e.tar.xz discoin-d9d1bd3267cf0f9fc6f56250bd8cd3af7596c11e.zip | |
nCheckDepth chain height fix
Diffstat (limited to 'src/validation.cpp')
| -rw-r--r-- | src/validation.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index 09288be1c..4831e819d 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); |