Pass check level, check depth to VerifyDB()

This commit is contained in:
Jeff Garzik
2013-06-19 11:32:49 -04:00
parent 25dbb92860
commit 168ba99392
3 changed files with 5 additions and 5 deletions

View File

@@ -2616,13 +2616,12 @@ bool static LoadBlockIndexDB()
return true;
}
bool VerifyDB() {
bool VerifyDB(int nCheckLevel, int nCheckDepth)
{
if (pindexBest == NULL || pindexBest->pprev == NULL)
return true;
// Verify blocks in the best chain
int nCheckLevel = GetArg("-checklevel", 3);
int nCheckDepth = GetArg( "-checkblocks", 288);
if (nCheckDepth == 0)
nCheckDepth = 1000000000; // suffices until the year 19000
if (nCheckDepth > nBestHeight)