aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@bitpay.com>2013-06-22 23:08:13 -0700
committerJeff Garzik <jgarzik@bitpay.com>2013-06-22 23:08:13 -0700
commit4be2aba302a30812df6962c5ea3b81669ed630e9 (patch)
treea13baf0711b1db62143bc2d00d2f0d48a64106e9 /src/main.cpp
parentb4a8a326c067a350b5a5ff0e565555b57ffb3a2e (diff)
parentf590653377d5ee18c05894a58d226b5d2531077b (diff)
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 9b5459cae3..5c9aa32024 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;