Skip to content

Commit abb6fa7

Browse files
committed
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.
1 parent 713314a commit abb6fa7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/test/fuzz/coins_view.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ bool operator==(const Coin& a, const Coin& b)
3636

3737
void initialize_coins_view()
3838
{
39-
static const ECCVerifyHandle ecc_verify_handle;
40-
ECC_Start();
41-
SelectParams(CBaseChainParams::REGTEST);
39+
static const auto testing_setup = MakeFuzzingContext<const TestingSetup>();
4240
}
4341

4442
FUZZ_TARGET_INIT(coins_view, initialize_coins_view)

src/test/fuzz/load_external_block_file.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
void initialize_load_external_block_file()
1717
{
18-
static const auto testing_setup = MakeFuzzingContext<>();
18+
static const auto testing_setup = MakeFuzzingContext<const TestingSetup>();
1919
}
2020

2121
FUZZ_TARGET_INIT(load_external_block_file, initialize_load_external_block_file)

0 commit comments

Comments
 (0)