File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -299,12 +299,20 @@ FUZZ_TARGET_INIT(addrman, initialize_addrman)
299
299
});
300
300
}
301
301
const AddrMan& const_addr_man{addr_man};
302
+ std::optional<Network> network;
303
+ if (fuzzed_data_provider.ConsumeBool ()) {
304
+ network = fuzzed_data_provider.PickValueInArray (ALL_NETWORKS);
305
+ }
302
306
(void )const_addr_man.GetAddr (
303
307
/* max_addresses=*/ fuzzed_data_provider.ConsumeIntegralInRange <size_t >(0 , 4096 ),
304
308
/* max_pct=*/ fuzzed_data_provider.ConsumeIntegralInRange <size_t >(0 , 4096 ),
305
- /* network=*/ std::nullopt);
306
- (void )const_addr_man.Select (fuzzed_data_provider.ConsumeBool ());
307
- (void )const_addr_man.Size ();
309
+ network);
310
+ (void )const_addr_man.Select (fuzzed_data_provider.ConsumeBool (), network);
311
+ std::optional<bool > in_new;
312
+ if (fuzzed_data_provider.ConsumeBool ()) {
313
+ in_new = fuzzed_data_provider.ConsumeBool ();
314
+ }
315
+ (void )const_addr_man.Size (network, in_new);
308
316
CDataStream data_stream (SER_NETWORK, PROTOCOL_VERSION);
309
317
data_stream << const_addr_man;
310
318
}
You can’t perform that action at this time.
0 commit comments