diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2013-06-15 07:49:40 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2013-06-15 07:49:40 -0700 |
commit | e58154c447670a546936b850f0bba4de087a1583 (patch) | |
tree | c8d995f2b8eb840c0cda2d694c9a4aa27f8b027a | |
parent | f5442aeef4547f013b3edec54774410507704bc6 (diff) | |
parent | 0206e38dcd32e0cc76c6f0e08197a2a72bef0fb1 (diff) |
Merge pull request #2648 from Diapolo/txindex
allow txindex to be removed and add a reindex dialog
-rw-r--r-- | src/init.cpp | 11 | ||||
-rw-r--r-- | src/qt/bitcoinstrings.cpp | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/init.cpp b/src/init.cpp index f8b2b23fd0..fe74cd6963 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -744,6 +744,12 @@ 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"); @@ -767,7 +773,7 @@ bool AppInit2(boost::thread_group& threadGroup) // first suggest a reindex if (!fReset) { bool fRet = uiInterface.ThreadSafeMessageBox( - strLoadError + ".\n" + _("Do you want to rebuild the block database now?"), + strLoadError + ".\n\n" + _("Do you want to rebuild the block database now?"), "", CClientUIInterface::MSG_ERROR | CClientUIInterface::BTN_ABORT); if (fRet) { fReindex = true; @@ -781,9 +787,6 @@ bool AppInit2(boost::thread_group& threadGroup) } } - if (mapArgs.count("-txindex") && fTxIndex != GetBoolArg("-txindex", false)) - return InitError(_("You need to rebuild the databases using -reindex to change -txindex")); - // as LoadBlockIndex can take several minutes, it's possible the user // requested to kill bitcoin-qt during the last operation. If so, exit. // As the program has not fully started yet, Shutdown() is possibly overkill. diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index 4dae8999c3..1afce2eb7c 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -205,6 +205,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Verifying wallet..."), QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart Bitcoin to complete"), QT_TRANSLATE_NOOP("bitcoin-core", "Warning"), QT_TRANSLATE_NOOP("bitcoin-core", "Warning: This version is obsolete, upgrade required!"), -QT_TRANSLATE_NOOP("bitcoin-core", "You need to rebuild the databases using -reindex to change -txindex"), +QT_TRANSLATE_NOOP("bitcoin-core", "You need to rebuild the database using -reindex to change -txindex"), QT_TRANSLATE_NOOP("bitcoin-core", "wallet.dat corrupt, salvage failed"), };
\ No newline at end of file |