diff options
| author | practicalswift <[email protected]> | 2019-10-27 21:14:42 +0000 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2019-10-27 21:22:24 +0000 |
| commit | 9cae3d5e94f4481e0d251c924314e57187a07a60 (patch) | |
| tree | 41053973d88211253c77dc6ee7f4c426aef4f5d7 /src/test/fuzz/script_flags.cpp | |
| parent | Merge #17257: gui: disable font antialiasing for QR image address (diff) | |
| download | discoin-9cae3d5e94f4481e0d251c924314e57187a07a60.tar.xz discoin-9cae3d5e94f4481e0d251c924314e57187a07a60.zip | |
tests: Add fuzzer initialization (hold ECCVerifyHandle)
Diffstat (limited to 'src/test/fuzz/script_flags.cpp')
| -rw-r--r-- | src/test/fuzz/script_flags.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/fuzz/script_flags.cpp b/src/test/fuzz/script_flags.cpp index 0bf5cd5c7..08622d097 100644 --- a/src/test/fuzz/script_flags.cpp +++ b/src/test/fuzz/script_flags.cpp @@ -2,8 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <pubkey.h> #include <script/interpreter.h> #include <streams.h> +#include <util/memory.h> #include <version.h> #include <test/fuzz/fuzz.h> @@ -11,6 +13,11 @@ /** Flags that are not forbidden by an assert */ static bool IsValidFlagCombination(unsigned flags); +void initialize() +{ + 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); |