This commit is contained in:
jl777
2018-08-21 07:39:35 -11:00
parent dcf05e8490
commit 6cdb334320
2 changed files with 17 additions and 15 deletions

View File

@@ -1339,6 +1339,23 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// ********************************************************* Step 7: load block chain
fReindex = GetBoolArg("-reindex", false);
bool checkval;
fAddressIndex = GetBoolArg("-addressindex", DEFAULT_ADDRESSINDEX);
pblocktree->ReadFlag("addressindex", checkval);
if ( checkval != fAddressIndex )
{
pblocktree->WriteFlag("addressindex", fAddressIndex);
fprintf(stderr,"set addressindex, will reindex. sorry will take a while.\n");
fReindex = true;
}
fSpentIndex = GetBoolArg("-spentindex", DEFAULT_SPENTINDEX);
pblocktree->ReadFlag("spentindex", checkval);
if ( checkval != fSpentIndex )
{
pblocktree->WriteFlag("spentindex", fSpentIndex);
fprintf(stderr,"set spentindex, will reindex. sorry will take a while.\n");
fReindex = true;
}
// Upgrading to 0.8; hard-link the old blknnnn.dat files into /blocks/
boost::filesystem::path blocksDir = GetDataDir() / "blocks";