mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +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:
@@ -5,10 +5,12 @@
|
||||
#ifndef BITCOIN_KERNEL_CHAINSTATEMANAGER_OPTS_H
|
||||
#define BITCOIN_KERNEL_CHAINSTATEMANAGER_OPTS_H
|
||||
|
||||
#include <uint256.h>
|
||||
#include <util/time.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
|
||||
class CChainParams;
|
||||
|
||||
@@ -24,6 +26,8 @@ namespace kernel {
|
||||
struct ChainstateManagerOpts {
|
||||
const CChainParams& chainparams;
|
||||
const std::function<NodeClock::time_point()> adjusted_time_callback{nullptr};
|
||||
//! If set, it will override the block hash whose ancestors we will assume to have valid scripts without checking them.
|
||||
std::optional<uint256> assumed_valid_block;
|
||||
//! If the tip is older than this, the node is considered to be in initial block download.
|
||||
std::chrono::seconds max_tip_age{DEFAULT_MAX_TIP_AGE};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user