5#include <chainparams.h>
37 if (
const auto service_opt =
40 node.SetAddrLocal(*service_opt);
46 node.CloseSocketDisconnect();
50 node.CopyStats(stats);
53 const CNode* add_ref_node =
node.AddRef();
57 if (
node.GetRefCount() > 0) {
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();
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
std::unique_ptr< T > MakeNoLogFileContext(const ChainType chain_type=ChainType::REGTEST, TestOpts opts={})
Make a test setup that has disk access to the debug.log file disabled.
CService ConsumeService(FuzzedDataProvider &fuzzed_data_provider) noexcept
auto ConsumeNode(FuzzedDataProvider &fuzzed_data_provider, const std::optional< NodeId > &node_id_in=std::nullopt) noexcept
NodeSeconds 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
P ConsumeDeserializationParams(FuzzedDataProvider &fuzzed_data_provider) 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
std::optional< T > ConsumeDeserializable(FuzzedDataProvider &fuzzed_data_provider, const P ¶ms, 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.