Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
chainstatemanager_opts.h
Go to the documentation of this file.
1// Copyright (c) 2022 The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_KERNEL_CHAINSTATEMANAGER_OPTS_H
6#define BITCOIN_KERNEL_CHAINSTATEMANAGER_OPTS_H
7
9
10#include <arith_uint256.h>
11#include <dbwrapper.h>
13#include <txdb.h>
14#include <util/time.h>
15
16#include <cstdint>
17#include <functional>
18#include <optional>
19
20class Config;
21
22static constexpr bool DEFAULT_CHECKPOINTS_ENABLED{true};
23static constexpr auto DEFAULT_MAX_TIP_AGE{24h};
24static constexpr bool DEFAULT_STORE_RECENT_HEADERS_TIME{false};
25
26namespace kernel {
27
58
59} // namespace kernel
60
61#endif // BITCOIN_KERNEL_CHAINSTATEMANAGER_OPTS_H
static constexpr bool DEFAULT_CHECKPOINTS_ENABLED
static constexpr auto DEFAULT_MAX_TIP_AGE
static constexpr bool DEFAULT_STORE_RECENT_HEADERS_TIME
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
Definition fs.h:30
A base class defining functions for notifying about certain kernel events.
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85
User-controlled performance and debug options.
Definition txdb.h:56
User-controlled performance and debug options.
Definition dbwrapper.h:26
std::chrono::time_point< NodeClock > time_point
Definition time.h:19
An options struct for ChainstateManager, more ergonomically referred to as ChainstateManager::Options...
const std::function< NodeClock::time_point()> adjusted_time_callback
std::optional< bool > check_block_index
std::optional< arith_uint256 > minimum_chain_work
If set, it will override the minimum work we will assume exists on some valid chain.
std::chrono::seconds max_tip_age
If the tip is older than this, the node is considered to be in initial block download.
std::optional< BlockHash > assumed_valid_block
If set, it will override the block hash whose ancestors we will assume to have valid scripts without ...
bool store_recent_headers_time
If set, store and load the last few block headers reception time to speed up RTT bootstraping.