diff options
author | fanquake <fanquake@gmail.com> | 2023-07-17 13:18:27 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-07-17 13:36:53 +0100 |
commit | bf03fed2c70dbb9e526ce2e423b4c1dcb32e0e58 (patch) | |
tree | 6e39f637379ade3ba39a10b88173cf1275565c50 /src/test/fuzz/pow.cpp | |
parent | 275b3e47ccb5c58a969f562e1f51c575d4513a27 (diff) | |
parent | fa6dfaaf45bde465969fa7d8fa6b6574a497a6ca (diff) |
Merge bitcoin/bitcoin#28065: fuzz: Flatten all FUZZ_TARGET macros into one
fa6dfaaf45bde465969fa7d8fa6b6574a497a6ca scripted-diff: Use new FUZZ_TARGET macro everywhere (MarcoFalke)
fa36ad8b091c70190491280dcf0794e94e34a9ed fuzz: Accept options in FUZZ_TARGET macro (MarcoFalke)
Pull request description:
The `FUZZ_TARGET` macros have many issues:
* The developer will have to pick the right macro to pass the wanted option.
* Adding a new option requires doubling the number of existing macros in the worst case.
Fix all issues by using only a single macro.
This refactor does not change behavior.
ACKs for top commit:
dergoegge:
ACK fa6dfaaf45bde465969fa7d8fa6b6574a497a6ca
Tree-SHA512: 49a34553867a1734ce89e616b2d7c29b784a67cd8990db6573f0c7b18957636ef0c81d3d0d444a04c12cdc98bc4c4aa7a2ec94e6232dc363620a746e28416444
Diffstat (limited to 'src/test/fuzz/pow.cpp')
-rw-r--r-- | src/test/fuzz/pow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/fuzz/pow.cpp b/src/test/fuzz/pow.cpp index 6d584c9f10..05cdb740e4 100644 --- a/src/test/fuzz/pow.cpp +++ b/src/test/fuzz/pow.cpp @@ -23,7 +23,7 @@ void initialize_pow() SelectParams(ChainType::MAIN); } -FUZZ_TARGET_INIT(pow, initialize_pow) +FUZZ_TARGET(pow, .init = initialize_pow) { FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); const Consensus::Params& consensus_params = Params().GetConsensus(); @@ -87,7 +87,7 @@ FUZZ_TARGET_INIT(pow, initialize_pow) } -FUZZ_TARGET_INIT(pow_transition, initialize_pow) +FUZZ_TARGET(pow_transition, .init = initialize_pow) { FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); const Consensus::Params& consensus_params{Params().GetConsensus()}; |