v29.4-roots.4 · Commit 3: [PATCH 03/37] policy: restore conservative relay and network controls
src/test/fuzz/util/net.h
Before: src/test/fuzz/util/net.h · After: src/test/fuzz/util/net.h
File metadata
index 698001a7f15ed8204809d6b28f81942980a78dca..381103aa8b6ec88da11b569ffe20f17233220621 100644
Download original patch · Release notes
Diff rows 1–22 of 22. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
src/test/fuzz/util/net.h
CHANGED
|
@@ -239,6 +239,8 @@ auto ConsumeNode(FuzzedDataProvider& fuzzed_data_provider, const std::optional<N
|
|
|
239
239
|
const std::string addr_name = fuzzed_data_provider.ConsumeRandomLengthString(64);
|
|
240
240
|
const ConnectionType conn_type = fuzzed_data_provider.PickValueInArray(ALL_CONNECTION_TYPES);
|
|
241
241
|
const bool inbound_onion{conn_type == ConnectionType::INBOUND ? fuzzed_data_provider.ConsumeBool() : false};
|
|
242
|
+
const uint64_t network_id = fuzzed_data_provider.ConsumeIntegral<uint64_t>();
|
|
243
|
+
|
|
242
244
|
NetPermissionFlags permission_flags = ConsumeWeakEnum(fuzzed_data_provider, ALL_NET_PERMISSION_FLAGS);
|
|
243
245
|
if constexpr (ReturnUniquePtr) {
|
|
244
246
|
return std::make_unique<CNode>(node_id,
|
|
@@ -250,6 +252,7 @@ auto ConsumeNode(FuzzedDataProvider& fuzzed_data_provider, const std::optional<N
|
|
|
250
252
|
addr_name,
|
|
251
253
|
conn_type,
|
|
252
254
|
inbound_onion,
|
|
255
|
+
network_id,
|
|
253
256
|
CNodeOptions{ .permission_flags = permission_flags });
|
|
254
257
|
} else {
|
|
255
258
|
return CNode{node_id,
|
|
@@ -261,6 +264,7 @@ auto ConsumeNode(FuzzedDataProvider& fuzzed_data_provider, const std::optional<N
|
|
|
261
264
|
addr_name,
|
|
262
265
|
conn_type,
|
|
263
266
|
inbound_onion,
|
|
267
|
+
network_id,
|
|
264
268
|
CNodeOptions{ .permission_flags = permission_flags }};
|
|
265
269
|
}
|
|
266
270
|
}
|