]> Git Repo - VerusCoin.git/commitdiff
Eliminate spurious "must reindex" messages if reindex is set
authormiketout <[email protected]>
Mon, 15 Jun 2020 19:17:17 +0000 (12:17 -0700)
committermiketout <[email protected]>
Mon, 15 Jun 2020 19:17:17 +0000 (12:17 -0700)
src/init.cpp

index 97dd9c4ba4e3358c4851b6af9af20be62786677d..cf85569c36f2df05342822e78ad28738b9f8037f 100644 (file)
@@ -1670,21 +1670,22 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
                     break;
                 }
                 KOMODO_LOADINGBLOCKS = 0;
+
                 // Check for changed -txindex state
-                if (fTxIndex != GetBoolArg("-txindex", true)) {
+                if (!fReindex && fTxIndex != GetBoolArg("-txindex", true)) {
                     strLoadError = _("You need to rebuild the database using -reindex to change -txindex");
                     break;
                 }
 
                 // Check for changed -insightexplorer state
-                if (fInsightExplorer != GetBoolArg("-insightexplorer", DEFAULT_INSIGHTEXPLORER)) {
+                if (!fReindex && fInsightExplorer != GetBoolArg("-insightexplorer", DEFAULT_INSIGHTEXPLORER) ) {
                     strLoadError = _("You need to rebuild the database using -reindex to change -insightexplorer");
                     break;
                 }
 
                 // Check for changed -prune state.  What we are concerned about is a user who has pruned blocks
                 // in the past, but is now trying to run unpruned.
-                if (fHavePruned && !fPruneMode) {
+                if (!fReindex && fHavePruned && !fPruneMode) {
                     strLoadError = _("You need to rebuild the database using -reindex to go back to unpruned mode.  This will redownload the entire blockchain");
                     break;
                 }
This page took 0.027156 seconds and 4 git commands to generate.