6#include <chainparams.h>
51 }
catch (
const std::ios_base::failure&) {
82 connman.Init(options);
129 connman.ForEachNode([](
auto) {});
176 connman.OpenNetworkConnection(
187 connman.CreateNodeFromAcceptedSocketPublic(
198 options.
vWhiteBinds = std::vector<NetWhitebindPermissions>{
210 connman.InitBindsPublic(options);
213 connman.SocketHandlerPublic();
217 (
void)connman.GetExtraFullOutboundCount();
218 (
void)connman.GetLocalServices();
220 (
void)connman.GetMaxOutboundTimeframe();
221 (
void)connman.GetMaxOutboundTimeLeftInCycle();
222 (
void)connman.GetNetworkActive();
223 std::vector<CNodeStats> stats;
224 connman.GetNodeStats(stats);
225 (
void)connman.GetOutboundTargetBytesLeft();
226 (
void)connman.GetTotalBytesRecv();
227 (
void)connman.GetTotalBytesSent();
228 (
void)connman.GetTryNewOutboundPeer();
229 (
void)connman.GetUseAddrmanOutgoing();
230 (
void)connman.ASMapHealthCheck();
232 connman.ClearTestNodes();
static int32_t GetCheckRatio(const NodeContext &node_ctx)
const TestingSetup * g_setup
const CChainParams & Params()
Return the currently selected parameters.
int64_t GetIntArg(const std::string &strArg, int64_t nDefault) const
A CService with information about it as peer.
Information about a peer.
Double ended buffer combining vector and stream-like interfaces.
std::string ConsumeRandomLengthString(size_t max_length)
T ConsumeIntegralInRange(T min, T max)
T PickValueInArray(const T(&array)[size])
ConnectionType
Different types of connections to a peer.
@ OUTBOUND_FULL_RELAY
These are the default connections that we use to connect with the network.
@ INBOUND
Inbound connections are those initiated by a peer.
void initialize_connman()
#define LIMITED_WHILE(condition, limit)
Can be used to limit a theoretically unbounded loop.
std::function< std::unique_ptr< Sock >(int, int, int)> CreateSock
Socket factory.
std::vector< NetWhitebindPermissions > vWhiteBinds
uint64_t nMaxOutboundLimit
std::vector< CService > onion_binds
NetEventsInterface * m_msgproc
std::vector< CService > vBinds
bool bind_on_any
True if the user did not specify -bind= or -whitebind= and thus we should bind on 0....
Testing setup that configures a complete environment.
CAddress ConsumeAddress(FuzzedDataProvider &fuzzed_data_provider) noexcept
CNetAddr ConsumeNetAddr(FuzzedDataProvider &fuzzed_data_provider, FastRandomContext *rand) noexcept
Create a CNetAddr.
CService ConsumeService(FuzzedDataProvider &fuzzed_data_provider) noexcept
CSubNet ConsumeSubNet(FuzzedDataProvider &fuzzed_data_provider) noexcept
NetGroupManager ConsumeNetGroupManager(FuzzedDataProvider &fuzzed_data_provider) noexcept
std::unique_ptr< CNode > ConsumeNodeAsUniquePtr(FuzzedDataProvider &fdp, const std::optional< NodeId > &node_id_in=std::nullopt)
std::vector< CService > ConsumeServiceVector(FuzzedDataProvider &fuzzed_data_provider, size_t max_vector_size=5) noexcept
auto ConsumeNode(FuzzedDataProvider &fuzzed_data_provider, const std::optional< NodeId > &node_id_in=std::nullopt) noexcept
FuzzedNetEvents ConsumeNetEvents(FuzzedDataProvider &fdp) noexcept
std::shared_ptr< CThreadInterrupt > ConsumeThreadInterrupt(FuzzedDataProvider &fuzzed_data_provider)
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
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 ConnectionType ALL_CONNECTION_TYPES[]
constexpr NetPermissionFlags ALL_NET_PERMISSION_FLAGS[]
void SeedRandomStateForTest(SeedRand seedtype)
Seed the global RNG state for testing and log the seed value.
@ ZEROS
Seed with a compile time constant of zeros.
std::string random_string(uint32_t length)
void SetMockTime(int64_t nMockTimeIn)
DEPRECATED Use SetMockTime with chrono type.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
FuzzedDataProvider & fuzzed_data_provider