aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2021-01-15 15:59:06 -0500
committerCarl Dong <contact@carldong.me>2021-01-21 09:29:42 -0500
commitabb6fa728598c4cc8874eae1c3c5e587e36424cd (patch)
tree5864ddcb01dfcf76882f986846778807a8979672 /src/test
parent713314abfa224efceb7ba6fa7fef37c449902936 (diff)
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.cpp4
-rw-r--r--src/test/fuzz/load_external_block_file.cpp2
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)