Bitcoin Core  29.1.0
P2P Digital Currency
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>
12 #include <script/sigcache.h>
13 #include <txdb.h>
14 #include <uint256.h>
15 #include <util/time.h>
16 
17 #include <cstdint>
18 #include <functional>
19 #include <optional>
20 
21 class CChainParams;
22 class ValidationSignals;
23 
24 static constexpr bool DEFAULT_CHECKPOINTS_ENABLED{true};
25 static constexpr auto DEFAULT_MAX_TIP_AGE{24h};
26 
27 namespace kernel {
28 
37  std::optional<int32_t> check_block_index{};
40  std::optional<arith_uint256> minimum_chain_work{};
42  std::optional<uint256> assumed_valid_block{};
44  std::chrono::seconds max_tip_age{DEFAULT_MAX_TIP_AGE};
53 };
54 
55 } // namespace kernel
56 
57 #endif // BITCOIN_KERNEL_CHAINSTATEMANAGER_OPTS_H
std::optional< uint256 > assumed_valid_block
If set, it will override the block hash whose ancestors we will assume to have valid scripts without ...
An options struct for ChainstateManager, more ergonomically referred to as ChainstateManager::Options...
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system...
Definition: chainparams.h:80
User-controlled performance and debug options.
Definition: txdb.h:28
static constexpr bool DEFAULT_CHECKPOINTS_ENABLED
User-controlled performance and debug options.
Definition: dbwrapper.h:28
static constexpr size_t DEFAULT_SCRIPT_EXECUTION_CACHE_BYTES
Definition: sigcache.h:30
A base class defining functions for notifying about certain kernel events.
static constexpr auto DEFAULT_MAX_TIP_AGE
std::chrono::seconds max_tip_age
If the tip is older than this, the node is considered to be in initial block download.
int worker_threads_num
Number of script check worker threads. Zero means no parallel verification.
std::optional< arith_uint256 > minimum_chain_work
If set, it will override the minimum work we will assume exists on some valid chain.
static constexpr size_t DEFAULT_SIGNATURE_CACHE_BYTES
Definition: sigcache.h:29
std::optional< int32_t > check_block_index
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
Definition: fs.h:32