From f6f8026e40326e74293dc8ecc270a7e3b4850727 Mon Sep 17 00:00:00 2001 From: Karl-Johan Alm Date: Mon, 11 Jun 2018 14:16:51 +0900 Subject: [PATCH] validation: check the specified number of blocks (off-by-one) --- src/validation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 9791d6e2d8..43c2e73824 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -4006,7 +4006,7 @@ bool CVerifyDB::VerifyDB(const CChainParams& chainparams, CCoinsView *coinsview, reportDone = percentageDone/10; } uiInterface.ShowProgress(_("Verifying blocks..."), percentageDone, false); - if (pindex->nHeight < chainActive.Height()-nCheckDepth) + 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.