Test
This commit is contained in:
20
src/main.cpp
20
src/main.cpp
@@ -5319,11 +5319,27 @@ bool InitBlockIndex() {
|
||||
|
||||
// Initialize global variables that cannot be constructed at startup.
|
||||
recentRejects.reset(new CRollingBloomFilter(120000, 0.000001));
|
||||
|
||||
fprintf(stderr,"InitBlockIndex called\n");
|
||||
// Check whether we're already initialized
|
||||
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;
|
||||
|
||||
}
|
||||
// Use the provided setting for -txindex in the new database
|
||||
fTxIndex = GetBoolArg("-txindex", true);
|
||||
pblocktree->WriteFlag("txindex", fTxIndex);
|
||||
|
||||
Reference in New Issue
Block a user