aboutsummaryrefslogtreecommitdiff
path: root/src/test/net_peer_eviction_tests.cpp
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2020-12-25 23:56:17 +0100
committerJon Atack <jon@atack.com>2021-03-19 20:11:45 +0100
commit8b1e156143740a5548dc7b601d40fb141e6aae1c (patch)
tree190c7430ca8c2cdf81ead7b20f718cae19ba1348 /src/test/net_peer_eviction_tests.cpp
parent72e30e8e03f880eba4bd1c3fc18b5558d8cef680 (diff)
Add m_inbound_onion to AttemptToEvictConnection()
and an `m_is_onion` struct member to NodeEvictionCandidate and tests. We'll use these in the peer eviction logic to protect inbound onion peers in addition to the existing protection of localhost peers.
Diffstat (limited to 'src/test/net_peer_eviction_tests.cpp')
-rw-r--r--src/test/net_peer_eviction_tests.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/net_peer_eviction_tests.cpp b/src/test/net_peer_eviction_tests.cpp
index 418f5a4f71..517474bad4 100644
--- a/src/test/net_peer_eviction_tests.cpp
+++ b/src/test/net_peer_eviction_tests.cpp
@@ -36,6 +36,7 @@ std::vector<NodeEvictionCandidate> GetRandomNodeEvictionCandidates(const int n_c
/* nKeyedNetGroup */ random_context.randrange(100),
/* prefer_evict */ random_context.randbool(),
/* m_is_local */ random_context.randbool(),
+ /* m_is_onion */ random_context.randbool(),
});
}
return candidates;