Check pblocktree
This commit is contained in:
30
src/main.cpp
30
src/main.cpp
@@ -6443,22 +6443,24 @@ bool InitBlockIndex() {
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Use the provided setting for -txindex in the new database
|
if ( pblocktree != 0 )
|
||||||
fTxIndex = GetBoolArg("-txindex", true);
|
{
|
||||||
pblocktree->WriteFlag("txindex", fTxIndex);
|
// Use the provided setting for -txindex in the new database
|
||||||
// Use the provided setting for -addressindex in the new database
|
fTxIndex = GetBoolArg("-txindex", true);
|
||||||
fAddressIndex = GetBoolArg("-addressindex", DEFAULT_ADDRESSINDEX);
|
pblocktree->WriteFlag("txindex", fTxIndex);
|
||||||
pblocktree->WriteFlag("addressindex", fAddressIndex);
|
// Use the provided setting for -addressindex in the new database
|
||||||
|
fAddressIndex = GetBoolArg("-addressindex", DEFAULT_ADDRESSINDEX);
|
||||||
|
pblocktree->WriteFlag("addressindex", fAddressIndex);
|
||||||
|
|
||||||
// Use the provided setting for -timestampindex in the new database
|
// Use the provided setting for -timestampindex in the new database
|
||||||
fTimestampIndex = GetBoolArg("-timestampindex", DEFAULT_TIMESTAMPINDEX);
|
fTimestampIndex = GetBoolArg("-timestampindex", DEFAULT_TIMESTAMPINDEX);
|
||||||
pblocktree->WriteFlag("timestampindex", fTimestampIndex);
|
pblocktree->WriteFlag("timestampindex", fTimestampIndex);
|
||||||
|
|
||||||
fSpentIndex = GetBoolArg("-spentindex", DEFAULT_SPENTINDEX);
|
|
||||||
pblocktree->WriteFlag("spentindex", fSpentIndex);
|
|
||||||
fprintf(stderr,"fAddressIndex.%d/%d fSpentIndex.%d/%d\n",fAddressIndex,DEFAULT_ADDRESSINDEX,fSpentIndex,DEFAULT_SPENTINDEX);
|
|
||||||
LogPrintf("Initializing databases...\n");
|
|
||||||
|
|
||||||
|
fSpentIndex = GetBoolArg("-spentindex", DEFAULT_SPENTINDEX);
|
||||||
|
pblocktree->WriteFlag("spentindex", fSpentIndex);
|
||||||
|
fprintf(stderr,"fAddressIndex.%d/%d fSpentIndex.%d/%d\n",fAddressIndex,DEFAULT_ADDRESSINDEX,fSpentIndex,DEFAULT_SPENTINDEX);
|
||||||
|
LogPrintf("Initializing databases...\n");
|
||||||
|
}
|
||||||
// Only add the genesis block if not reindexing (in which case we reuse the one already on disk)
|
// Only add the genesis block if not reindexing (in which case we reuse the one already on disk)
|
||||||
if (!fReindex) {
|
if (!fReindex) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user