Check pblocktree

This commit is contained in:
jl777
2019-07-02 02:20:53 -11:00
parent 710c0fc9ff
commit 7631855841

View File

@@ -6443,6 +6443,8 @@ bool InitBlockIndex() {
{ {
return true; return true;
} }
if ( pblocktree != 0 )
{
// Use the provided setting for -txindex in the new database // Use the provided setting for -txindex in the new database
fTxIndex = GetBoolArg("-txindex", true); fTxIndex = GetBoolArg("-txindex", true);
pblocktree->WriteFlag("txindex", fTxIndex); pblocktree->WriteFlag("txindex", fTxIndex);
@@ -6458,7 +6460,7 @@ bool InitBlockIndex() {
pblocktree->WriteFlag("spentindex", fSpentIndex); pblocktree->WriteFlag("spentindex", fSpentIndex);
fprintf(stderr,"fAddressIndex.%d/%d fSpentIndex.%d/%d\n",fAddressIndex,DEFAULT_ADDRESSINDEX,fSpentIndex,DEFAULT_SPENTINDEX); fprintf(stderr,"fAddressIndex.%d/%d fSpentIndex.%d/%d\n",fAddressIndex,DEFAULT_ADDRESSINDEX,fSpentIndex,DEFAULT_SPENTINDEX);
LogPrintf("Initializing databases...\n"); 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 {