Fix zindex flag detection
This commit is contained in:
@@ -1283,14 +1283,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Komodo is probably already running.") + " %s.", strDataDir, e.what()));
|
||||
}
|
||||
|
||||
fprintf(stderr,"About to create pidfile\n");
|
||||
#ifndef _WIN32
|
||||
CreatePidFile(GetPidFile(), getpid());
|
||||
#endif
|
||||
fprintf(stderr,"created pidfile\n");
|
||||
if (GetBoolArg("-shrinkdebugfile", !fDebug))
|
||||
ShrinkDebugFile();
|
||||
fprintf(stderr,"past shrinkdebugfile\n");
|
||||
LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
|
||||
LogPrintf("Komodo version %s (%s)\n", FormatFullVersion(), CLIENT_DATE);
|
||||
|
||||
@@ -1669,8 +1666,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
break;
|
||||
}
|
||||
|
||||
// Check for changed -zindex state
|
||||
if (fZindex != GetBoolArg("-zindex", false)) {
|
||||
fprintf(stderr, "zindex=%s in block index??\n", fZindex ? "enabled" : "disabled");
|
||||
// Turning on -zindex requires a reindex, turning it off doesn't
|
||||
if (fZindex && (fZindex != GetBoolArg("-zindex", false))) {
|
||||
strLoadError = _("You need to rebuild the database using -reindex to change -zindex");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -6680,7 +6680,7 @@ bool InitBlockIndex() {
|
||||
pblocktree->WriteFlag("addressindex", fAddressIndex);
|
||||
|
||||
// Use the provided setting for -zindex in the new database
|
||||
fAddressIndex = GetBoolArg("-zindex", DEFAULT_SHIELDEDINDEX);
|
||||
fZindex = GetBoolArg("-zindex", DEFAULT_SHIELDEDINDEX);
|
||||
pblocktree->WriteFlag("zindex", fZindex);
|
||||
|
||||
// Use the provided setting for -timestampindex in the new database
|
||||
|
||||
@@ -158,6 +158,7 @@ extern bool fImporting;
|
||||
extern bool fReindex;
|
||||
extern int nScriptCheckThreads;
|
||||
extern bool fTxIndex;
|
||||
extern bool fZindex;
|
||||
extern bool fIsBareMultisigStd;
|
||||
extern bool fCheckBlockIndex;
|
||||
extern bool fCheckpointsEnabled;
|
||||
|
||||
Reference in New Issue
Block a user