diff options
author | TheCharlatan <seb.kung@gmail.com> | 2024-05-18 11:18:44 +0200 |
---|---|---|
committer | TheCharlatan <seb.kung@gmail.com> | 2024-07-05 09:03:04 +0200 |
commit | 606a7ab862470413ced400aa68a94fd37c8ad3d3 (patch) | |
tree | 73755b6bff7552069b60d1ab9f1c739bdde42bbe /src/test/util | |
parent | 66d74bfc45ae0f743084475ac3bbfb4355bb6ec2 (diff) |
kernel: De-globalize signature cache
Move its ownership to the ChainstateManager class.
Next to simplifying usage of the kernel library by no longer requiring
manual setup of the cache prior to using validation code, it also slims
down the amount of memory allocated by BasicTestingSetup.
Use this opportunity to make SignatureCache RAII styled
Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
Diffstat (limited to 'src/test/util')
-rw-r--r-- | src/test/util/setup_common.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp index 7408fd8ec4..3bf1f76019 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -6,8 +6,6 @@ #include <test/util/setup_common.h> -#include <kernel/validation_cache_sizes.h> - #include <addrman.h> #include <banman.h> #include <chainparams.h> @@ -30,7 +28,6 @@ #include <node/mempool_args.h> #include <node/miner.h> #include <node/peerman_args.h> -#include <node/validation_cache_args.h> #include <node/warnings.h> #include <noui.h> #include <policy/fees.h> @@ -68,7 +65,6 @@ #include <stdexcept> using kernel::BlockTreeDB; -using kernel::ValidationCacheSizes; using node::ApplyArgsManOptions; using node::BlockAssembler; using node::BlockManager; @@ -188,10 +184,6 @@ BasicTestingSetup::BasicTestingSetup(const ChainType chainType, const std::vecto m_node.ecc_context = std::make_unique<ECC_Context>(); SetupEnvironment(); - ValidationCacheSizes validation_cache_sizes{}; - ApplyArgsManOptions(*m_node.args, validation_cache_sizes); - Assert(InitSignatureCache(validation_cache_sizes.signature_cache_bytes)); - m_node.chain = interfaces::MakeChain(m_node); static bool noui_connected = false; if (!noui_connected) { |