mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
addrman: change Select to support multiple networks
This commit is contained in:
parent
f698636ec8
commit
829becd990
7 changed files with 63 additions and 41 deletions
|
|
@ -285,7 +285,15 @@ FUZZ_TARGET(addrman, .init = initialize_addrman)
|
|||
auto max_pct = fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096);
|
||||
auto filtered = fuzzed_data_provider.ConsumeBool();
|
||||
(void)const_addr_man.GetAddr(max_addresses, max_pct, network, filtered);
|
||||
(void)const_addr_man.Select(fuzzed_data_provider.ConsumeBool(), network);
|
||||
|
||||
std::unordered_set<Network> nets;
|
||||
for (const auto& net : ALL_NETWORKS) {
|
||||
if (fuzzed_data_provider.ConsumeBool()) {
|
||||
nets.insert(net);
|
||||
}
|
||||
}
|
||||
(void)const_addr_man.Select(fuzzed_data_provider.ConsumeBool(), nets);
|
||||
|
||||
std::optional<bool> in_new;
|
||||
if (fuzzed_data_provider.ConsumeBool()) {
|
||||
in_new = fuzzed_data_provider.ConsumeBool();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue