18#include <validation.h>
26std::optional<bilingual_str>
28 if (
auto value{args.
GetBoolArg(
"-checkblockindex")}) {
32 if (
auto value{args.
GetBoolArg(
"-checkpoints")}) {
36 if (
auto value{args.
GetArg(
"-minimumchainwork")}) {
40 "Invalid non-hex (%s) minimum chain work value specified"),
46 if (
auto value{args.
GetArg(
"-assumevalid")}) {
50 if (
auto value{args.
GetIntArg(
"-maxtipage")}) {
59 if (script_threads <= 0) {
68 LogPrintf(
"Script verification uses %d additional threads\n",
71 if (
auto value{args.
GetBoolArg(
"-persistrecentheaderstime")}) {
78 if (
auto max_size = args.
GetIntArg(
"-maxscriptcachesize")) {
80 std::max<int64_t>(*max_size, 0) * (1 << 20);
82 if (
auto max_size = args.
GetIntArg(
"-maxsigcachesize")) {
84 std::max<int64_t>(*max_size, 0) * (1 << 20);
88 if (
auto value{args.
GetBoolArg(
"-parkdeepreorg")}) {
93 "-automaticunparking",
arith_uint256 UintToArith256(const uint256 &a)
static constexpr bool AVALANCHE_DEFAULT_ENABLED
Is avalanche enabled by default.
static constexpr int DEFAULT_SCRIPTCHECK_THREADS
-par default (number of script-checking threads, 0 = auto)
static constexpr int MAX_SCRIPTCHECK_THREADS
Maximum number of dedicated script-checking threads allowed.
int64_t GetIntArg(const std::string &strArg, int64_t nDefault) const
Return integer argument or default value.
std::string GetArg(const std::string &strArg, const std::string &strDefault) const
Return string argument or default value.
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
void ReadCoinsViewArgs(const ArgsManager &args, CoinsViewOptions &options)
void ReadDatabaseArgs(const ArgsManager &args, DBOptions &options)
void ApplyArgsManOptions(const ArgsManager &args, const Config &config, BlockFitter::Options &options)
Apply options from ArgsManager to BlockFitter options.
static BlockHash fromHex(const std::string &str)
An options struct for ChainstateManager, more ergonomically referred to as ChainstateManager::Options...
size_t signature_cache_bytes
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 ...
size_t script_execution_cache_bytes
int worker_threads_num
Number of script check worker threads.
bool store_recent_headers_time
If set, store and load the last few block headers reception time to speed up RTT bootstraping.
CoinsViewOptions coins_view
std::optional< int64_t > replay_protection_activation_time
If set, this overwrites the timestamp at which replay protection activates.
int GetNumCores()
Return the number of cores available on the current system.
bilingual_str Untranslated(std::string original)
Mark a bilingual_str as untranslated.
uint256 uint256S(const char *str)
uint256 from const char *.
bool IsHexNumber(std::string_view str)
Return true if the string is a hex number, optionally prefixed with "0x".