Test
This commit is contained in:
17
src/init.cpp
17
src/init.cpp
@@ -1339,6 +1339,23 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||||||
// ********************************************************* Step 7: load block chain
|
// ********************************************************* Step 7: load block chain
|
||||||
|
|
||||||
fReindex = GetBoolArg("-reindex", false);
|
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/
|
// Upgrading to 0.8; hard-link the old blknnnn.dat files into /blocks/
|
||||||
boost::filesystem::path blocksDir = GetDataDir() / "blocks";
|
boost::filesystem::path blocksDir = GetDataDir() / "blocks";
|
||||||
|
|||||||
15
src/main.cpp
15
src/main.cpp
@@ -5323,21 +5323,6 @@ bool InitBlockIndex() {
|
|||||||
// Check whether we're already initialized
|
// Check whether we're already initialized
|
||||||
if (chainActive.Genesis() != NULL)
|
if (chainActive.Genesis() != NULL)
|
||||||
{
|
{
|
||||||
bool checkval;
|
|
||||||
fAddressIndex = GetBoolArg("-addressindex", DEFAULT_ADDRESSINDEX);
|
|
||||||
pblocktree->ReadFlag("addressindex", checkval);
|
|
||||||
if ( checkval != fAddressIndex )
|
|
||||||
{
|
|
||||||
pblocktree->WriteFlag("addressindex", fAddressIndex);
|
|
||||||
fprintf(stderr,"set addressindex\n");
|
|
||||||
}
|
|
||||||
fSpentIndex = GetBoolArg("-spentindex", DEFAULT_SPENTINDEX);
|
|
||||||
pblocktree->ReadFlag("spentindex", checkval);
|
|
||||||
if ( checkval != fSpentIndex )
|
|
||||||
{
|
|
||||||
pblocktree->WriteFlag("spentindex", fSpentIndex);
|
|
||||||
fprintf(stderr,"set spentindex\n");
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Use the provided setting for -txindex in the new database
|
// Use the provided setting for -txindex in the new database
|
||||||
|
|||||||
Reference in New Issue
Block a user