![]() |
Bitcoin Core 22.99.0
P2P Digital Currency
|
#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>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) | |
| BOOST_AUTO_TEST_CASE | ( | peer_eviction_test | ) |
Definition at line 462 of file net_peer_eviction_tests.cpp.
| BOOST_AUTO_TEST_CASE | ( | peer_protection_test | ) |
Definition at line 62 of file net_peer_eviction_tests.cpp.
| 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 453 of file net_peer_eviction_tests.cpp.
| bool IsEvicted | ( | std::vector< NodeEvictionCandidate > | candidates, |
| const std::unordered_set< NodeId > & | node_ids, | ||
| FastRandomContext & | random_context | ||
| ) |
Definition at line 440 of file net_peer_eviction_tests.cpp.
| 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.