mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
tests: Skip unnecessary fuzzer initialisation. Hold ECCVerifyHandle only when needed.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include <net.h>
|
||||
#include <primitives/block.h>
|
||||
#include <protocol.h>
|
||||
#include <pubkey.h>
|
||||
#include <streams.h>
|
||||
#include <undo.h>
|
||||
#include <version.h>
|
||||
@@ -23,6 +24,12 @@
|
||||
|
||||
#include <test/fuzz/fuzz.h>
|
||||
|
||||
void initialize()
|
||||
{
|
||||
// Fuzzers using pubkey must hold an ECCVerifyHandle.
|
||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
||||
}
|
||||
|
||||
void test_one_input(const std::vector<uint8_t>& buffer)
|
||||
{
|
||||
CDataStream ds(buffer, SER_NETWORK, INIT_PROTO_VERSION);
|
||||
|
||||
Reference in New Issue
Block a user