diff options
author | MacroFake <falke.marco@gmail.com> | 2022-07-20 22:00:11 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-10-18 14:08:49 +0200 |
commit | fa29d0b57cdeb91c8798d5c90ba9cc18085e99fb (patch) | |
tree | 70ac8833fe2de5938b96d988537e5d9955b7c141 /src/validation.h | |
parent | faf44876db555f7488c8df96db9fa88b793f897c (diff) |
Move ::hashAssumeValid into ChainstateManager
This changes the assumed valid block for the bitcoin-chainstate
executable. Previously it was uint256{}, now it is defaultAssumeValid.
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/validation.h b/src/validation.h index e1807c82f8..0483edaff3 100644 --- a/src/validation.h +++ b/src/validation.h @@ -99,9 +99,6 @@ extern bool g_parallel_script_checks; extern bool fCheckBlockIndex; extern bool fCheckpointsEnabled; -/** Block hash whose ancestors we will assume to have valid scripts without checking them. */ -extern uint256 hashAssumeValid; - /** Minimum work we will assume exists on some valid chain. */ extern arith_uint256 nMinimumChainWork; @@ -864,13 +861,11 @@ private: public: using Options = kernel::ChainstateManagerOpts; - explicit ChainstateManager(Options options) : m_options{std::move(options)} - { - Assert(m_options.adjusted_time_callback); - } + explicit ChainstateManager(Options options); const CChainParams& GetParams() const { return m_options.chainparams; } const Consensus::Params& GetConsensus() const { return m_options.chainparams.GetConsensus(); } + const uint256& AssumedValidBlock() const { return *Assert(m_options.assumed_valid_block); } /** * Alias for ::cs_main. |