34 node.SetCommonVersion(fuzzed_data_provider.ConsumeIntegral<
int>());
39 node.CloseSocketDisconnect();
43 node.CopyStats(stats);
46 const CNode* add_ref_node =
node.AddRef();
50 if (
node.GetRefCount() > 0) {
55 const std::optional<CService> service_opt = ConsumeDeserializable<CService>(fuzzed_data_provider);
59 node.SetAddrLocal(*service_opt);
64 node.ReceiveMsgBytes(b, complete);
68 (void)
node.GetAddrLocal();
70 (void)
node.GetLocalNonce();
71 const int ref_count =
node.GetRefCount();
73 (void)
node.GetCommonVersion();
76 (void)
node.HasPermission(net_permission_flags);
77 (void)
node.ConnectedThroughNetwork();
FUZZ_TARGET_INIT(net, initialize_net)
WeakEnumType ConsumeWeakEnum(FuzzedDataProvider &fuzzed_data_provider, const WeakEnumType(&all_types)[size]) noexcept
constexpr NetPermissionFlags ALL_NET_PERMISSION_FLAGS[]
#define LIMITED_WHILE(condition, limit)
Can be used to limit a theoretically unbounded loop.
static const std::string MAIN
Chain name strings.
void SetMockTime(int64_t nMockTimeIn)
DEPRECATED Use SetMockTime with chrono type.
std::vector< uint8_t > ConsumeRandomLengthByteVector(FuzzedDataProvider &fuzzed_data_provider, const std::optional< size_t > &max_length=std::nullopt) noexcept
int64_t ConsumeTime(FuzzedDataProvider &fuzzed_data_provider, const std::optional< int64_t > &min, const std::optional< int64_t > &max) noexcept
size_t CallOneOf(FuzzedDataProvider &fuzzed_data_provider, Callables... callables)
Information about a peer.
auto ConsumeNode(FuzzedDataProvider &fuzzed_data_provider, const std::optional< NodeId > &node_id_in=std::nullopt) noexcept