aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJeff Garzik <[email protected]>2013-06-22 23:08:13 -0700
committerJeff Garzik <[email protected]>2013-06-22 23:08:13 -0700
commit4be2aba302a30812df6962c5ea3b81669ed630e9 (patch)
treea13baf0711b1db62143bc2d00d2f0d48a64106e9 /src/main.cpp
parentMerge pull request #2660 from TheBlueMatt/gmfrefactor (diff)
parentRPC: add 'verifychain', to verify chain database at runtime (diff)
downloaddiscoin-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.cpp7
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;