mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 04:12:36 -03:00
fuzz: Use ConsumeUInt256 helper to simplify rolling_bloom_filter fuzz test
This commit is contained in:
parent
aaaa61fd30
commit
faa86b71ac
1 changed files with 4 additions and 7 deletions
|
@ -36,13 +36,10 @@ FUZZ_TARGET(rolling_bloom_filter)
|
|||
assert(present);
|
||||
},
|
||||
[&] {
|
||||
const std::optional<uint256> u256 = ConsumeDeserializable<uint256>(fuzzed_data_provider);
|
||||
if (!u256) {
|
||||
return;
|
||||
}
|
||||
(void)rolling_bloom_filter.contains(*u256);
|
||||
rolling_bloom_filter.insert(*u256);
|
||||
const bool present = rolling_bloom_filter.contains(*u256);
|
||||
const uint256 u256{ConsumeUInt256(fuzzed_data_provider)};
|
||||
(void)rolling_bloom_filter.contains(u256);
|
||||
rolling_bloom_filter.insert(u256);
|
||||
const bool present = rolling_bloom_filter.contains(u256);
|
||||
assert(present);
|
||||
},
|
||||
[&] {
|
||||
|
|
Loading…
Reference in a new issue