Bitcoin Core 32.99.0
P2P Digital Currency
Loading...
Searching...
No Matches
Functions
net_tests.cpp File Reference
#include <addrman.h>
#include <bip324.h>
#include <chainparams.h>
#include <clientversion.h>
#include <common/args.h>
#include <compat/compat.h>
#include <net.h>
#include <net_processing.h>
#include <netaddress.h>
#include <netbase.h>
#include <netmessagemaker.h>
#include <node/protocol_version.h>
#include <serialize.h>
#include <span.h>
#include <streams.h>
#include <test/util/common.h>
#include <test/util/net.h>
#include <test/util/random.h>
#include <test/util/setup_common.h>
#include <test/util/validation.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <validation.h>
#include <boost/test/unit_test.hpp>
#include <algorithm>
#include <cstdint>
#include <ios>
#include <memory>
#include <optional>
#include <string>
Include dependency graph for net_tests.cpp:

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (cnode_listen_port)
 
 BOOST_AUTO_TEST_CASE (cnode_simple_test)
 
 BOOST_AUTO_TEST_CASE (cnetaddr_basic)
 
 BOOST_AUTO_TEST_CASE (cnetaddr_tostring_canonical_ipv6)
 
 BOOST_AUTO_TEST_CASE (cnetaddr_serialize_v1)
 
 BOOST_AUTO_TEST_CASE (cnetaddr_serialize_v2)
 
 BOOST_AUTO_TEST_CASE (cnetaddr_unserialize_v2)
 
 BOOST_AUTO_TEST_CASE (ipv4_peer_with_ipv6_addrMe_test)
 
 BOOST_AUTO_TEST_CASE (get_local_addr_for_peer_port)
 
 BOOST_AUTO_TEST_CASE (LimitedAndReachable_Network)
 
 BOOST_AUTO_TEST_CASE (LimitedAndReachable_NetworkCaseUnroutableAndInternal)
 
CNetAddr UtilBuildAddress (unsigned char p1, unsigned char p2, unsigned char p3, unsigned char p4)
 
 BOOST_AUTO_TEST_CASE (LimitedAndReachable_CNetAddr)
 
 BOOST_AUTO_TEST_CASE (LocalAddress_BasicLifecycle)
 
 BOOST_AUTO_TEST_CASE (LocalAddress_nScore_Overflow)
 
 BOOST_AUTO_TEST_CASE (initial_advertise_from_version_message)
 
 BOOST_AUTO_TEST_CASE (advertise_local_address)
 
 BOOST_AUTO_TEST_CASE (v2transport_test)
 
 BOOST_AUTO_TEST_CASE (version_message_min_peer_proto_version)
 
 BOOST_AUTO_TEST_CASE (private_broadcast_version_does_not_update_addrman_services)
 
 BOOST_AUTO_TEST_CASE (only_non_inbound_version_message_promotes_addr_to_tried)
 
 BOOST_AUTO_TEST_CASE (addlocal_onlynet_externalip)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/21]

BOOST_AUTO_TEST_CASE ( addlocal_onlynet_externalip  )

Definition at line 1802 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/21]

BOOST_AUTO_TEST_CASE ( advertise_local_address  )

Definition at line 983 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/21]

BOOST_AUTO_TEST_CASE ( cnetaddr_basic  )

Definition at line 143 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/21]

BOOST_AUTO_TEST_CASE ( cnetaddr_serialize_v1  )

Definition at line 336 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [5/21]

BOOST_AUTO_TEST_CASE ( cnetaddr_serialize_v2  )

Definition at line 370 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [6/21]

BOOST_AUTO_TEST_CASE ( cnetaddr_tostring_canonical_ipv6  )

Definition at line 283 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [7/21]

BOOST_AUTO_TEST_CASE ( cnetaddr_unserialize_v2  )

Definition at line 404 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [8/21]

BOOST_AUTO_TEST_CASE ( cnode_listen_port  )

Definition at line 44 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [9/21]

BOOST_AUTO_TEST_CASE ( cnode_simple_test  )

Definition at line 56 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [10/21]

BOOST_AUTO_TEST_CASE ( get_local_addr_for_peer_port  )

Definition at line 654 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [11/21]

BOOST_AUTO_TEST_CASE ( initial_advertise_from_version_message  )

Definition at line 883 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [12/21]

BOOST_AUTO_TEST_CASE ( ipv4_peer_with_ipv6_addrMe_test  )

Definition at line 602 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [13/21]

BOOST_AUTO_TEST_CASE ( LimitedAndReachable_CNetAddr  )

Definition at line 820 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [14/21]

BOOST_AUTO_TEST_CASE ( LimitedAndReachable_Network  )

Definition at line 756 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [15/21]

Definition at line 789 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [16/21]

BOOST_AUTO_TEST_CASE ( LocalAddress_BasicLifecycle  )

Definition at line 834 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [17/21]

BOOST_AUTO_TEST_CASE ( LocalAddress_nScore_Overflow  )

Definition at line 848 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [18/21]

Definition at line 1738 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [19/21]

Definition at line 1708 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [20/21]

BOOST_AUTO_TEST_CASE ( v2transport_test  )

Whether an initiator or responder is being tested.

Use either 0 bytes or the maximum possible (4095 bytes) garbage length.

How many decoy packets to send before the version packet.

What data to send in the version packet (ignored by BIP324 peers, but reserved for future extensions).

Whether to immediately send key and garbage out (required for responders, optional otherwise).

How many decoy packets to send before the first and second real message.

The number of random garbage bytes before the included first 15 bytes of terminator.

The number of random garbage bytes after it.

Definition at line 1422 of file net_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [21/21]

BOOST_AUTO_TEST_CASE ( version_message_min_peer_proto_version  )

Definition at line 1680 of file net_tests.cpp.

Here is the call graph for this function:

◆ UtilBuildAddress()

CNetAddr UtilBuildAddress ( unsigned char  p1,
unsigned char  p2,
unsigned char  p3,
unsigned char  p4 
)

Definition at line 809 of file net_tests.cpp.

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