diff options
author | Jon Atack <jon@atack.com> | 2021-06-10 11:44:55 +0200 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2021-06-13 20:15:47 +0200 |
commit | 4ee7aec47ebf6b59b4d930e6e4025e91352c05b4 (patch) | |
tree | 85b8dbf02595930be27cf35ac4a7e778c93e190c /src/test | |
parent | 7321e6f2fe1641eb331f30e68646f5984d4bcbb3 (diff) |
p2p: add m_network to NodeEvictionCandidate struct
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/node_eviction.cpp | 1 | ||||
-rw-r--r-- | src/test/net_peer_eviction_tests.cpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/test/fuzz/node_eviction.cpp b/src/test/fuzz/node_eviction.cpp index 70ffc6bf37..9f02b5271b 100644 --- a/src/test/fuzz/node_eviction.cpp +++ b/src/test/fuzz/node_eviction.cpp @@ -32,6 +32,7 @@ FUZZ_TARGET(node_eviction) /* prefer_evict */ fuzzed_data_provider.ConsumeBool(), /* m_is_local */ fuzzed_data_provider.ConsumeBool(), /* m_is_onion */ fuzzed_data_provider.ConsumeBool(), + /* m_network */ fuzzed_data_provider.PickValueInArray(ALL_NETWORKS), }); } // Make a copy since eviction_candidates may be in some valid but otherwise diff --git a/src/test/net_peer_eviction_tests.cpp b/src/test/net_peer_eviction_tests.cpp index 3b981cf69c..7e74b6f6a3 100644 --- a/src/test/net_peer_eviction_tests.cpp +++ b/src/test/net_peer_eviction_tests.cpp @@ -2,7 +2,9 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <netaddress.h> #include <net.h> +#include <test/util/net.h> #include <test/util/setup_common.h> #include <boost/test/unit_test.hpp> @@ -32,6 +34,7 @@ std::vector<NodeEvictionCandidate> GetRandomNodeEvictionCandidates(const int n_c /* prefer_evict */ random_context.randbool(), /* m_is_local */ random_context.randbool(), /* m_is_onion */ random_context.randbool(), + /* m_network */ ALL_NETWORKS[random_context.randrange(ALL_NETWORKS.size())], }); } return candidates; |