From dcf05e849008e908b00552fb4230c9c4c25d3228 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 21 Aug 2018 07:31:40 -1100 Subject: [PATCH] Test --- src/main.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index b7f57e678..e4b2f0500 100644 --- a/src/main.cpp +++ b/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);