aboutsummaryrefslogtreecommitdiff
path: root/src/test/net_tests.cpp
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-02-16 17:52:40 +0800
committerfanquake <fanquake@gmail.com>2021-02-16 18:48:30 +0800
commit9bbf08bf98487eeb75f143c120cfd544ea3135fb (patch)
treea917e243c064a64bf4cc73066742492e2426c872 /src/test/net_tests.cpp
parentb55dc3ad84abec4f58e54a8581bdf8556c74b1e3 (diff)
parenta5e15ae45ccae7948a6c5b95e6621f01afb88d55 (diff)
downloadbitcoin-9bbf08bf98487eeb75f143c120cfd544ea3135fb.tar.xz
Merge #20721: Net: Move ping data to net_processing
a5e15ae45ccae7948a6c5b95e6621f01afb88d55 scripted-diff: rename ping members (John Newbery) 45dcf2266125c65d7f546bdb211a278bd090a284 [net processing] Move ping data fields to net processing (John Newbery) dd2646d12c172cb8899669af717c590483a17404 [net processing] Move ping timeout logic to net processing (John Newbery) 0b43b81f69ff13dbc1e893a80950f186690b4f62 [net processing] Move send ping message logic into function (John Newbery) 1a07600b4b0d08cffc7cd5c58af33fcd1ede558e [net] Add RunInactivityChecks() (John Newbery) f8b3058992b507f3a6aac9d4e2db00102ae1b197 [net processing] Add Peer& arg to MaybeDiscourageAndDisconnect() (John Newbery) Pull request description: This continues the work of moving application layer data into net_processing, by moving all ping data into the new Peer object added in #19607. For motivation, see #19398. ACKs for top commit: glozow: reACK https://github.com/bitcoin/bitcoin/commit/a5e15ae45ccae7948a6c5b95e6621f01afb88d55 MarcoFalke: review ACK a5e15ae45ccae7948a6c5b95e6621f01afb88d55 🥉 amitiuttarwar: ACK a5e15ae45c Tree-SHA512: fb84241613d6a6e1f2832fa5378030b5877a02e8308188f57ab545a6eaf2ab731a93abb7dcd3a7f7285bb66700f938096378a8e90cd6a3e6f3309f81d85a344e
Diffstat (limited to 'src/test/net_tests.cpp')
-rw-r--r--src/test/net_tests.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp
index 010a3375cf..f52905e1ef 100644
--- a/src/test/net_tests.cpp
+++ b/src/test/net_tests.cpp
@@ -794,7 +794,7 @@ std::vector<NodeEvictionCandidate> GetRandomNodeEvictionCandidates(const int n_c
candidates.push_back({
/* id */ id,
/* nTimeConnected */ static_cast<int64_t>(random_context.randrange(100)),
- /* nMinPingUsecTime */ static_cast<int64_t>(random_context.randrange(100)),
+ /* m_min_ping_time */ static_cast<int64_t>(random_context.randrange(100)),
/* nLastBlockTime */ static_cast<int64_t>(random_context.randrange(100)),
/* nLastTXTime */ static_cast<int64_t>(random_context.randrange(100)),
/* fRelevantServices */ random_context.randbool(),
@@ -854,7 +854,7 @@ BOOST_AUTO_TEST_CASE(node_eviction_test)
// from eviction.
BOOST_CHECK(!IsEvicted(
number_of_nodes, [](NodeEvictionCandidate& candidate) {
- candidate.nMinPingUsecTime = candidate.id;
+ candidate.m_min_ping_time = candidate.id;
},
{0, 1, 2, 3, 4, 5, 6, 7}, random_context));
@@ -901,7 +901,7 @@ BOOST_AUTO_TEST_CASE(node_eviction_test)
BOOST_CHECK(!IsEvicted(
number_of_nodes, [number_of_nodes](NodeEvictionCandidate& candidate) {
candidate.nKeyedNetGroup = number_of_nodes - candidate.id; // 4 protected
- candidate.nMinPingUsecTime = candidate.id; // 8 protected
+ candidate.m_min_ping_time = candidate.id; // 8 protected
candidate.nLastTXTime = number_of_nodes - candidate.id; // 4 protected
candidate.nLastBlockTime = number_of_nodes - candidate.id; // 4 protected
},