aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2013-01-11 06:27:30 -0800
committerGregory Maxwell <greg@xiph.org>2013-01-11 06:27:30 -0800
commit1f4b80a43798eff00167c529abd770635ea98a26 (patch)
tree69e64f6678cbc17e0471b4fcbd8bd23b5f32e86c /src/init.cpp
parent45a1ec51b14aae32397a5e3e3d67ff9137855137 (diff)
parent1f355b66cd90f1bd96a862604a7216e8ba56f853 (diff)
downloadbitcoin-1f4b80a43798eff00167c529abd770635ea98a26.tar.xz
Merge pull request #2145 from sipa/checkcoins
Coin database checks
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 557c23fc92..79e9b2fb10 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -300,7 +300,7 @@ std::string HelpMessage()
" -rescan " + _("Rescan the block chain for missing wallet transactions") + "\n" +
" -salvagewallet " + _("Attempt to recover private keys from a corrupt wallet.dat") + "\n" +
" -checkblocks=<n> " + _("How many blocks to check at startup (default: 2500, 0 = all)") + "\n" +
- " -checklevel=<n> " + _("How thorough the block verification is (0-6, default: 1)") + "\n" +
+ " -checklevel=<n> " + _("How thorough the block verification is (0-4, default: 3)") + "\n" +
" -loadblock=<file> " + _("Imports blocks from external blk000??.dat file") + "\n" +
" -reindex " + _("Rebuild blockchain index from current blk000??.dat files") + "\n" +
@@ -752,7 +752,10 @@ bool AppInit2()
pblocktree->WriteReindexing(true);
if (!LoadBlockIndex())
- return InitError(_("Error loading blkindex.dat"));
+ return InitError(_("Error loading block/coin databases"));
+
+ if (!VerifyDB())
+ return InitError(_("Corrupted database detected. Please restart the client with -reindex."));
// as LoadBlockIndex can take several minutes, it's possible the user
// requested to kill bitcoin-qt during the last operation. If so, exit.