aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-07-26 12:59:48 +0200
committerMacroFake <falke.marco@gmail.com>2022-10-18 14:11:48 +0200
commitfa7c834b9f988fa7f2ace2d67b1628211b7819df (patch)
treea8c19c847f5b38b3660b1177a2ffbcf001fda151 /src/validation.h
parentfa43188d86288fa6666307a77c106c8f069ebdbe (diff)
downloadbitcoin-fa7c834b9f988fa7f2ace2d67b1628211b7819df.tar.xz
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).
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h4
1 files changed, 2 insertions, 2 deletions
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<std::string> 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); }