diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2019-10-23 21:46:53 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2019-10-24 08:06:38 +0000 |
commit | db4bd32cc31789fc017f5db0b86a69ee43e41575 (patch) | |
tree | b97eeea39cbba000407c8323023d0d92b7ecd53a /src/test/fuzz/deserialize.cpp | |
parent | c5ac7af7793a70d73d6bab09a7bc29dc4ddc7ea2 (diff) | |
download | bitcoin-db4bd32cc31789fc017f5db0b86a69ee43e41575.tar.xz |
tests: Skip unnecessary fuzzer initialisation. Hold ECCVerifyHandle only when needed.
Diffstat (limited to 'src/test/fuzz/deserialize.cpp')
-rw-r--r-- | src/test/fuzz/deserialize.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/fuzz/deserialize.cpp b/src/test/fuzz/deserialize.cpp index 3a6876ad39..bcd8691359 100644 --- a/src/test/fuzz/deserialize.cpp +++ b/src/test/fuzz/deserialize.cpp @@ -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); |