diff options
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/validation.h b/src/validation.h index cae4ed4f14..6f4404e7ec 100644 --- a/src/validation.h +++ b/src/validation.h @@ -362,6 +362,7 @@ bool TestBlockValidity(BlockValidationState& state, CChainState& chainstate, const CBlock& block, CBlockIndex* pindexPrev, + const std::function<int64_t()>& adjusted_time_callback, bool fCheckPOW = true, bool fCheckMerkleRoot = true) EXCLUSIVE_LOCKS_REQUIRED(cs_main); @@ -837,6 +838,8 @@ private: const CChainParams& m_chainparams; + const std::function<int64_t()> m_adjusted_time_callback; + //! Internal helper for ActivateSnapshot(). [[nodiscard]] bool PopulateAndValidateSnapshot( CChainState& snapshot_chainstate, @@ -857,7 +860,8 @@ public: using Options = ChainstateManagerOpts; explicit ChainstateManager(const Options& opts) - : m_chainparams(opts.chainparams) {}; + : m_chainparams{opts.chainparams}, + m_adjusted_time_callback{Assert(opts.adjusted_time_callback)} {}; const CChainParams& GetParams() const { return m_chainparams; } const Consensus::Params& GetConsensus() const { return m_chainparams.GetConsensus(); } |