mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
fuzz: move ConsumeNetGroupManager to util
This commit is contained in:
parent
fe624631ae
commit
18c8a0945b
2 changed files with 8 additions and 7 deletions
|
|
@ -39,13 +39,6 @@ void initialize_addrman()
|
|||
g_setup = testing_setup.get();
|
||||
}
|
||||
|
||||
[[nodiscard]] inline NetGroupManager ConsumeNetGroupManager(FuzzedDataProvider& fuzzed_data_provider) noexcept
|
||||
{
|
||||
std::vector<bool> asmap = ConsumeRandomLengthBitVector(fuzzed_data_provider);
|
||||
if (!SanityCheckASMap(asmap, 128)) asmap.clear();
|
||||
return NetGroupManager(asmap);
|
||||
}
|
||||
|
||||
FUZZ_TARGET(data_stream_addr_man, .init = initialize_addrman)
|
||||
{
|
||||
FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue