diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2013-06-23 15:49:08 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2013-06-23 15:49:08 -0700 |
commit | fd967fed89a294622f24c8e97c0ed23afb969edd (patch) | |
tree | 9800c8780303c75d9ed79926431205d99c078faf /src/init.cpp | |
parent | ee4949794bb7f881a67266ad598edb5cf6019d31 (diff) | |
parent | 067a6092ac33b503a645af6b65c400ee1e7e0e4a (diff) |
Merge pull request #2783 from sipa/newtxindex
Initialize database before checking changed txindex
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/init.cpp b/src/init.cpp index 7b98253ead..449ee906bf 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -749,18 +749,18 @@ bool AppInit2(boost::thread_group& threadGroup) if (!mapBlockIndex.empty() && pindexGenesisBlock == NULL) return InitError(_("Incorrect or no genesis block found. Wrong datadir for network?")); - // Check for changed -txindex state (only necessary if we are not reindexing anyway) - if (!fReindex && fTxIndex != GetBoolArg("-txindex", false)) { - strLoadError = _("You need to rebuild the database using -reindex to change -txindex"); - break; - } - // Initialize the block index (no-op if non-empty database was already loaded) if (!InitBlockIndex()) { strLoadError = _("Error initializing block database"); break; } + // Check for changed -txindex state + if (fTxIndex != GetBoolArg("-txindex", false)) { + strLoadError = _("You need to rebuild the database using -reindex to change -txindex"); + break; + } + uiInterface.InitMessage(_("Verifying blocks...")); if (!VerifyDB(GetArg("-checklevel", 3), GetArg( "-checkblocks", 288))) { |