mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-04 17:00:52 +02:00
fuzz: Use ConsumeUInt256 helper to simplify rolling_bloom_filter fuzz test
This commit is contained in:
parent
aaaa61fd30
commit
faa86b71ac
@ -36,13 +36,10 @@ FUZZ_TARGET(rolling_bloom_filter)
|
|||||||
assert(present);
|
assert(present);
|
||||||
},
|
},
|
||||||
[&] {
|
[&] {
|
||||||
const std::optional<uint256> u256 = ConsumeDeserializable<uint256>(fuzzed_data_provider);
|
const uint256 u256{ConsumeUInt256(fuzzed_data_provider)};
|
||||||
if (!u256) {
|
(void)rolling_bloom_filter.contains(u256);
|
||||||
return;
|
rolling_bloom_filter.insert(u256);
|
||||||
}
|
const bool present = rolling_bloom_filter.contains(u256);
|
||||||
(void)rolling_bloom_filter.contains(*u256);
|
|
||||||
rolling_bloom_filter.insert(*u256);
|
|
||||||
const bool present = rolling_bloom_filter.contains(*u256);
|
|
||||||
assert(present);
|
assert(present);
|
||||||
},
|
},
|
||||||
[&] {
|
[&] {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user