5#include <chainparams.h>
27 static const auto testing_setup = MakeNoLogFileContext<>(
ChainType::MAIN);
36 if (
const auto service_opt =
37 ConsumeDeserializable<CService>(fuzzed_data_provider, ConsumeDeserializationParams<CNetAddr::SerParams>(fuzzed_data_provider)))
39 node.SetAddrLocal(*service_opt);
45 node.CloseSocketDisconnect();
49 node.CopyStats(stats);
52 const CNode* add_ref_node =
node.AddRef();
56 if (
node.GetRefCount() > 0) {
63 node.ReceiveMsgBytes(b, complete);
67 (void)
node.GetAddrLocal();
69 (void)
node.GetLocalNonce();
70 const int ref_count =
node.GetRefCount();
72 (void)
node.GetCommonVersion();
75 (void)
node.HasPermission(net_permission_flags);
76 (void)
node.ConnectedThroughNetwork();
97 assert(service.IsRoutable());
Information about a peer.
A combination of a network address (CNetAddr) and a (TCP) port.
T ConsumeIntegralInRange(T min, T max)
#define LIMITED_WHILE(condition, limit)
Can be used to limit a theoretically unbounded loop.
bool IsLocal(const CService &addr)
check whether a given address is potentially local
void RemoveLocal(const CService &addr)
bool AddLocal(const CService &addr_, int nScore)
CService GetLocalAddress(const CNode &peer)
GlobalMutex g_maplocalhost_mutex
bool SeenLocal(const CService &addr)
vote for a local address
FUZZ_TARGET(net,.init=initialize_net)
CService ConsumeService(FuzzedDataProvider &fuzzed_data_provider) noexcept
auto ConsumeNode(FuzzedDataProvider &fuzzed_data_provider, const std::optional< NodeId > &node_id_in=std::nullopt) noexcept
int64_t ConsumeTime(FuzzedDataProvider &fuzzed_data_provider, const std::optional< int64_t > &min, const std::optional< int64_t > &max) noexcept
WeakEnumType ConsumeWeakEnum(FuzzedDataProvider &fuzzed_data_provider, const WeakEnumType(&all_types)[size]) noexcept
size_t CallOneOf(FuzzedDataProvider &fuzzed_data_provider, Callables... callables)
std::vector< B > ConsumeRandomLengthByteVector(FuzzedDataProvider &fuzzed_data_provider, const std::optional< size_t > &max_length=std::nullopt) noexcept
constexpr NetPermissionFlags ALL_NET_PERMISSION_FLAGS[]
void SetMockTime(int64_t nMockTimeIn)
DEPRECATED Use SetMockTime with chrono type.