diff options
| author | Jeff Garzik <[email protected]> | 2013-06-22 23:08:13 -0700 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2013-06-22 23:08:13 -0700 |
| commit | 4be2aba302a30812df6962c5ea3b81669ed630e9 (patch) | |
| tree | a13baf0711b1db62143bc2d00d2f0d48a64106e9 /src/main.cpp | |
| parent | Merge pull request #2660 from TheBlueMatt/gmfrefactor (diff) | |
| parent | RPC: add 'verifychain', to verify chain database at runtime (diff) | |
| download | discoin-4be2aba302a30812df6962c5ea3b81669ed630e9.tar.xz discoin-4be2aba302a30812df6962c5ea3b81669ed630e9.zip | |
Merge pull request #2778 from jgarzik/rpc-verifydb
RPC: add 'verifychain' to verify chain database at runtime
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9b5459cae..5c9aa3202 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2686,14 +2686,13 @@ 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) + if (nCheckDepth <= 0) nCheckDepth = 1000000000; // suffices until the year 19000 if (nCheckDepth > nBestHeight) nCheckDepth = nBestHeight; |