mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
kernel: Remove key module from kernel library
The key module's functionality is not used by the kernel library, but currently kernel users are still required to initialize the key module's `secp256k1_context_sign` global as part of the `kernel::Context` through `ECC_Start`.
This commit is contained in:
@@ -183,6 +183,7 @@ BasicTestingSetup::BasicTestingSetup(const ChainType chainType, const std::vecto
|
||||
AppInitParameterInteraction(*m_node.args);
|
||||
LogInstance().StartLogging();
|
||||
m_node.kernel = std::make_unique<kernel::Context>();
|
||||
m_node.ecc_context = std::make_unique<ECC_Context>();
|
||||
SetupEnvironment();
|
||||
|
||||
ValidationCacheSizes validation_cache_sizes{};
|
||||
@@ -200,6 +201,7 @@ BasicTestingSetup::BasicTestingSetup(const ChainType chainType, const std::vecto
|
||||
|
||||
BasicTestingSetup::~BasicTestingSetup()
|
||||
{
|
||||
m_node.ecc_context.reset();
|
||||
m_node.kernel.reset();
|
||||
SetMockTime(0s); // Reset mocktime for following tests
|
||||
LogInstance().DisconnectTestLogger();
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define BITCOIN_TEST_UTIL_SETUP_COMMON_H
|
||||
|
||||
#include <common/args.h> // IWYU pragma: export
|
||||
#include <kernel/context.h>
|
||||
#include <key.h>
|
||||
#include <node/caches.h>
|
||||
#include <node/context.h> // IWYU pragma: export
|
||||
@@ -15,6 +16,7 @@
|
||||
#include <util/chaintype.h> // IWYU pragma: export
|
||||
#include <util/check.h>
|
||||
#include <util/fs.h>
|
||||
#include <util/signalinterrupt.h>
|
||||
#include <util/string.h>
|
||||
#include <util/vector.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user