AddLocal
, RemoveLocal
, SeenLocal
, IsLocal
)
AddLocal
, RemoveLocal
, SeenLocal
, IsLocal
)
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For detailed information about the code coverage, see the test coverage report.
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
76@@ -77,3 +77,33 @@ FUZZ_TARGET(net, .init = initialize_net)
77 (void)node.HasPermission(net_permission_flags);
78 (void)node.ConnectedThroughNetwork();
79 }
80+
81+FUZZ_TARGET(local_address, .init = initialize_net)
82+{
83+ FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
84+ SetMockTime(ConsumeTime(fuzzed_data_provider));
88+ fuzzed_data_provider,
89+ [&] {
90+ service = ConsumeService(fuzzed_data_provider);
91+ },
92+ [&] {
93+ const bool added{AddLocal(service, fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 5))};
mapLocalHost
each iteration.
102+ [&] {
103+ (void)SeenLocal(service);
104+ },
105+ [&] {
106+ (void)IsLocal(service);
107+ });
GetLocal
as well?
Force-pushed addressing: #29495 (review) #29495 (review) #29495 (review)
Thanks, @dergoegge
107+ },
108+ [&] {
109+ (void)IsLocal(service);
110+ },
111+ [&] {
112+ auto peer{ConsumeNode(fuzzed_data_provider)};
CNode
each time, maybe do what you did with the service.
92+ fuzzed_data_provider,
93+ [&] {
94+ service = ConsumeService(fuzzed_data_provider);
95+ },
96+ [&] {
97+ const bool added{AddLocal(service, fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 5))};
Maybe use LOCAL_MAX
here instead of hardcoding 5
:
0 const bool added{AddLocal(service, fuzzed_data_provider.ConsumeIntegralInRange<int>(0, LOCAL_MAX - 1))};
🐙 This pull request conflicts with the target branch and needs rebase.