mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Move ::hashAssumeValid into ChainstateManager
This changes the assumed valid block for the bitcoin-chainstate
executable. Previously it was uint256{}, now it is defaultAssumeValid.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user