aboutsummaryrefslogtreecommitdiff
path: root/src/test/util/setup_common.cpp
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-08-15 16:43:11 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-08-20 07:54:04 +0200
commitfa899fb7aa8a14acecadd8936ad5824fa0f697ff (patch)
tree2e799a045fe506edd3f2dd60a137b419532dcc53 /src/test/util/setup_common.cpp
parentfa386642b4dfd88f74488c288c7886494d69f4ed (diff)
downloadbitcoin-fa899fb7aa8a14acecadd8936ad5824fa0f697ff.tar.xz
fuzz: Speed up utxo_snapshot fuzz target
This speeds up the fuzz target, which allows "valid" inputs. It does not affect the "INVALID" fuzz target.
Diffstat (limited to 'src/test/util/setup_common.cpp')
-rw-r--r--src/test/util/setup_common.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp
index cf47d16faf..62ff61b227 100644
--- a/src/test/util/setup_common.cpp
+++ b/src/test/util/setup_common.cpp
@@ -244,9 +244,9 @@ ChainTestingSetup::ChainTestingSetup(const ChainType chainType, TestOpts opts)
m_node.notifications = std::make_unique<KernelNotifications>(*Assert(m_node.shutdown), m_node.exit_status, *Assert(m_node.warnings));
- m_make_chainman = [this, &chainparams] {
+ m_make_chainman = [this, &chainparams, opts] {
Assert(!m_node.chainman);
- const ChainstateManager::Options chainman_opts{
+ ChainstateManager::Options chainman_opts{
.chainparams = chainparams,
.datadir = m_args.GetDataDirNet(),
.check_block_index = 1,
@@ -254,6 +254,10 @@ ChainTestingSetup::ChainTestingSetup(const ChainType chainType, TestOpts opts)
.signals = m_node.validation_signals.get(),
.worker_threads_num = 2,
};
+ if (opts.min_validation_cache) {
+ chainman_opts.script_execution_cache_bytes = 0;
+ chainman_opts.signature_cache_bytes = 0;
+ }
const BlockManager::Options blockman_opts{
.chainparams = chainman_opts.chainparams,
.blocks_dir = m_args.GetBlocksDirPath(),