mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
refactor: Move {MAX,DEFAULT}_SCRIPTCHECK_THREADS
constants
This commit is contained in:
parent
6e17b31680
commit
5b3ea5fa2e
5 changed files with 7 additions and 6 deletions
|
@ -7,7 +7,6 @@
|
|||
#include <arith_uint256.h>
|
||||
#include <common/args.h>
|
||||
#include <common/system.h>
|
||||
#include <kernel/chainstatemanager_opts.h>
|
||||
#include <logging.h>
|
||||
#include <node/coins_view_args.h>
|
||||
#include <node/database_args.h>
|
||||
|
|
|
@ -10,6 +10,11 @@
|
|||
|
||||
class ArgsManager;
|
||||
|
||||
/** Maximum number of dedicated script-checking threads allowed */
|
||||
static constexpr int MAX_SCRIPTCHECK_THREADS{15};
|
||||
/** -par default (number of script-checking threads, 0 = auto) */
|
||||
static constexpr int DEFAULT_SCRIPTCHECK_THREADS{0};
|
||||
|
||||
namespace node {
|
||||
[[nodiscard]] util::Result<void> ApplyArgsManOptions(const ArgsManager& args, ChainstateManager::Options& opts);
|
||||
} // namespace node
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
|
||||
#include <common/system.h>
|
||||
#include <interfaces/node.h>
|
||||
#include <node/chainstatemanager_args.h>
|
||||
#include <netbase.h>
|
||||
#include <txdb.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <mapport.h>
|
||||
#include <net.h>
|
||||
#include <netbase.h>
|
||||
#include <node/chainstatemanager_args.h>
|
||||
#include <txdb.h> // for -dbcache defaults
|
||||
#include <util/string.h>
|
||||
#include <validation.h> // For DEFAULT_SCRIPTCHECK_THREADS
|
||||
|
|
|
@ -66,10 +66,6 @@ namespace util {
|
|||
class SignalInterrupt;
|
||||
} // namespace util
|
||||
|
||||
/** Maximum number of dedicated script-checking threads allowed */
|
||||
static const int MAX_SCRIPTCHECK_THREADS = 15;
|
||||
/** -par default (number of script-checking threads, 0 = auto) */
|
||||
static const int DEFAULT_SCRIPTCHECK_THREADS = 0;
|
||||
/** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of ActiveChain().Tip() will not be pruned. */
|
||||
static const unsigned int MIN_BLOCKS_TO_KEEP = 288;
|
||||
static const signed int DEFAULT_CHECKBLOCKS = 6;
|
||||
|
|
Loading…
Reference in a new issue