diff options
author | Carl Dong <contact@carldong.me> | 2021-01-15 15:59:06 -0500 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2021-01-21 09:29:42 -0500 |
commit | abb6fa728598c4cc8874eae1c3c5e587e36424cd (patch) | |
tree | 5864ddcb01dfcf76882f986846778807a8979672 /src/test | |
parent | 713314abfa224efceb7ba6fa7fef37c449902936 (diff) | |
download | bitcoin-abb6fa728598c4cc8874eae1c3c5e587e36424cd.tar.xz |
fuzz: Initialize a full TestingSetup where appropriate
A full TestingSetup is required for both coins_view and
load_external_block_file as they interact with the active chainstate.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/coins_view.cpp | 4 | ||||
-rw-r--r-- | src/test/fuzz/load_external_block_file.cpp | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/test/fuzz/coins_view.cpp b/src/test/fuzz/coins_view.cpp index 12ef4b203f..8ece94d771 100644 --- a/src/test/fuzz/coins_view.cpp +++ b/src/test/fuzz/coins_view.cpp @@ -36,9 +36,7 @@ bool operator==(const Coin& a, const Coin& b) void initialize_coins_view() { - static const ECCVerifyHandle ecc_verify_handle; - ECC_Start(); - SelectParams(CBaseChainParams::REGTEST); + static const auto testing_setup = MakeFuzzingContext<const TestingSetup>(); } FUZZ_TARGET_INIT(coins_view, initialize_coins_view) diff --git a/src/test/fuzz/load_external_block_file.cpp b/src/test/fuzz/load_external_block_file.cpp index 6e173908b9..207ee586bc 100644 --- a/src/test/fuzz/load_external_block_file.cpp +++ b/src/test/fuzz/load_external_block_file.cpp @@ -15,7 +15,7 @@ void initialize_load_external_block_file() { - static const auto testing_setup = MakeFuzzingContext<>(); + static const auto testing_setup = MakeFuzzingContext<const TestingSetup>(); } FUZZ_TARGET_INIT(load_external_block_file, initialize_load_external_block_file) |