mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02: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:
parent
faf44876db
commit
fa29d0b57c
6 changed files with 26 additions and 14 deletions
|
|
@ -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};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue