RPC: add 'verifychain', to verify chain database at runtime

This commit is contained in:
Jeff Garzik
2013-06-19 11:53:02 -04:00
parent 168ba99392
commit f590653377
4 changed files with 21 additions and 1 deletions

View File

@@ -2622,7 +2622,7 @@ bool VerifyDB(int nCheckLevel, int nCheckDepth)
return true;
// Verify blocks in the best chain
if (nCheckDepth == 0)
if (nCheckDepth <= 0)
nCheckDepth = 1000000000; // suffices until the year 19000
if (nCheckDepth > nBestHeight)
nCheckDepth = nBestHeight;