fuzz: Use ConsumeUInt256 helper to simplify rolling_bloom_filter fuzz test

This commit is contained in:
MarcoFalke 2021-07-15 11:54:13 +02:00
parent aaaa61fd30
commit faa86b71ac
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -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);
},
[&] {