From fa7c834b9f988fa7f2ace2d67b1628211b7819df Mon Sep 17 00:00:00 2001 From: MacroFake Date: Tue, 26 Jul 2022 12:59:48 +0200 Subject: Move ::fCheckBlockIndex into ChainstateManager This changes the flag for the bitcoin-chainstate executable. Previously it was false, now it is the chain's default value (still false for the main chain). --- src/validation.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/validation.h') diff --git a/src/validation.h b/src/validation.h index da5dc89482..076e6d53e0 100644 --- a/src/validation.h +++ b/src/validation.h @@ -95,7 +95,6 @@ extern uint256 g_best_block; * False indicates all script checking is done on the main threadMessageHandler thread. */ extern bool g_parallel_script_checks; -extern bool fCheckBlockIndex; /** Documentation for argument 'checklevel'. */ extern const std::vector CHECKLEVEL_DOC; @@ -691,7 +690,7 @@ public: /** * Make various assertions about the state of the block index. * - * By default this only executes fully when using the Regtest chain; see: fCheckBlockIndex. + * By default this only executes fully when using the Regtest chain; see: m_options.check_block_index. */ void CheckBlockIndex(); @@ -860,6 +859,7 @@ public: const CChainParams& GetParams() const { return m_options.chainparams; } const Consensus::Params& GetConsensus() const { return m_options.chainparams.GetConsensus(); } + bool ShouldCheckBlockIndex() const { return *Assert(m_options.check_block_index); } const arith_uint256& MinimumChainWork() const { return *Assert(m_options.minimum_chain_work); } const uint256& AssumedValidBlock() const { return *Assert(m_options.assumed_valid_block); } -- cgit v1.2.3