mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
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).
This commit is contained in:
@@ -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); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user