Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
net_peer_eviction_tests.cpp File Reference
#include <netaddress.h>
#include <net.h>
#include <test/util/net.h>
#include <test/util/setup_common.h>
#include <boost/test/unit_test.hpp>
#include <algorithm>
#include <functional>
#include <optional>
#include <unordered_set>
#include <vector>
Include dependency graph for net_peer_eviction_tests.cpp:

Go to the source code of this file.

Functions

bool IsProtected (int num_peers, std::function< void(NodeEvictionCandidate &)> candidate_setup_fn, const std::unordered_set< NodeId > &protected_peer_ids, const std::unordered_set< NodeId > &unprotected_peer_ids, FastRandomContext &random_context)
 BOOST_AUTO_TEST_CASE (peer_protection_test)
bool IsEvicted (std::vector< NodeEvictionCandidate > candidates, const std::unordered_set< NodeId > &node_ids, FastRandomContext &random_context)
bool IsEvicted (const int number_of_nodes, std::function< void(NodeEvictionCandidate &)> candidate_setup_fn, const std::unordered_set< NodeId > &node_ids, FastRandomContext &random_context)
 BOOST_AUTO_TEST_CASE (peer_eviction_test)

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( peer_eviction_test )

Definition at line 595 of file net_peer_eviction_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( peer_protection_test )

Definition at line 62 of file net_peer_eviction_tests.cpp.

Here is the call graph for this function:

◆ IsEvicted() [1/2]

bool IsEvicted ( const int number_of_nodes,
std::function< void(NodeEvictionCandidate &)> candidate_setup_fn,
const std::unordered_set< NodeId > & node_ids,
FastRandomContext & random_context )

Definition at line 586 of file net_peer_eviction_tests.cpp.

Here is the call graph for this function:

◆ IsEvicted() [2/2]

bool IsEvicted ( std::vector< NodeEvictionCandidate > candidates,
const std::unordered_set< NodeId > & node_ids,
FastRandomContext & random_context )

Definition at line 573 of file net_peer_eviction_tests.cpp.

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

◆ IsProtected()

bool IsProtected ( int num_peers,
std::function< void(NodeEvictionCandidate &)> candidate_setup_fn,
const std::unordered_set< NodeId > & protected_peer_ids,
const std::unordered_set< NodeId > & unprotected_peer_ids,
FastRandomContext & random_context )

Definition at line 24 of file net_peer_eviction_tests.cpp.

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