Skip to content

Commit

Permalink
Ensure consistency of -idindex flag on init
Browse files Browse the repository at this point in the history
  • Loading branch information
miketout committed Aug 25, 2022
1 parent 11c1134 commit 56731b2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1787,6 +1787,12 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
break;
}

pblocktree->ReadFlag("idindex", fIdIndex);
if (!fReindex && fIdIndex != GetBoolArg("-idindex", fIdIndex) ) {
strLoadError = _("You need to rebuild the database using -reindex to change -idindex");
break;
}

// Check for changed -insightexplorer state
pblocktree->ReadFlag("insightexplorer", fInsightExplorer);
if (!fReindex && fInsightExplorer != GetBoolArg("-insightexplorer", fInsightExplorer) ) {
Expand Down

0 comments on commit 56731b2

Please sign in to comment.