Bitcoin Core  27.99.0
P2P Digital Currency
Classes | Functions
net_peer_connection_tests.cpp File Reference
#include <chainparams.h>
#include <compat/compat.h>
#include <net.h>
#include <net_processing.h>
#include <netaddress.h>
#include <netbase.h>
#include <netgroup.h>
#include <node/connection_types.h>
#include <node/protocol_version.h>
#include <protocol.h>
#include <random.h>
#include <test/util/logging.h>
#include <test/util/net.h>
#include <test/util/random.h>
#include <test/util/setup_common.h>
#include <tinyformat.h>
#include <util/chaintype.h>
#include <algorithm>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include <boost/test/unit_test.hpp>
Include dependency graph for net_peer_connection_tests.cpp:

Go to the source code of this file.

Classes

struct  LogIPsTestingSetup
 

Functions

static CService ip (uint32_t i)
 
static void AddPeer (NodeId &id, std::vector< CNode * > &nodes, PeerManager &peerman, ConnmanTestMsg &connman, ConnectionType conn_type, bool onion_peer=false, std::optional< std::string > address=std::nullopt)
 Create a peer and connect to it. More...
 
 BOOST_AUTO_TEST_CASE (test_addnode_getaddednodeinfo_and_connection_detection)
 

Function Documentation

◆ AddPeer()

static void AddPeer ( NodeId id,
std::vector< CNode * > &  nodes,
PeerManager peerman,
ConnmanTestMsg connman,
ConnectionType  conn_type,
bool  onion_peer = false,
std::optional< std::string >  address = std::nullopt 
)
static

Create a peer and connect to it.

If the optional address (IP/CJDNS only) isn't passed, a random address is created.

Definition at line 47 of file net_peer_connection_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( test_addnode_getaddednodeinfo_and_connection_detection  )

Definition at line 84 of file net_peer_connection_tests.cpp.

Here is the call graph for this function:

◆ ip()

static CService ip ( uint32_t  i)
static

Definition at line 39 of file net_peer_connection_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: