diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/test/fuzz/utxo_snapshot.cpp | 1 | ||||
-rw-r--r-- | src/test/util/setup_common.cpp | 8 | ||||
-rw-r--r-- | src/test/util/setup_common.h | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/test/fuzz/utxo_snapshot.cpp b/src/test/fuzz/utxo_snapshot.cpp index 0a0896650f..63784c0621 100644 --- a/src/test/fuzz/utxo_snapshot.cpp +++ b/src/test/fuzz/utxo_snapshot.cpp @@ -51,6 +51,7 @@ void initialize_chain() TestOpts{ .setup_net = false, .setup_validation_interface = false, + .min_validation_cache = true, }), }; if constexpr (INVALID) { 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(), diff --git a/src/test/util/setup_common.h b/src/test/util/setup_common.h index 7d69551516..b73acc1de5 100644 --- a/src/test/util/setup_common.h +++ b/src/test/util/setup_common.h @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2022 The Bitcoin Core developers +// Copyright (c) 2015-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -55,6 +55,7 @@ struct TestOpts { bool block_tree_db_in_memory{true}; bool setup_net{true}; bool setup_validation_interface{true}; + bool min_validation_cache{false}; // Equivalent of -maxsigcachebytes=0 }; /** Basic testing setup. |