aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2020-06-21 18:15:56 -0400
committerJohn Newbery <john@johnnewbery.com>2021-02-15 16:02:43 +0000
commitdd2646d12c172cb8899669af717c590483a17404 (patch)
tree61d8e6619a2f8e56fe88d7097b2dec1776f5bf93 /src/net.cpp
parent0b43b81f69ff13dbc1e893a80950f186690b4f62 (diff)
[net processing] Move ping timeout logic to net processing
Ping messages are an application-level mechanism. Move timeout logic from net to net processing.
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/net.cpp b/src/net.cpp
index a02b66bd74..f8a417ddd1 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1247,14 +1247,6 @@ bool CConnman::InactivityCheck(const CNode& node) const
return true;
}
- if (node.nPingNonceSent && node.m_ping_start.load() + std::chrono::seconds{TIMEOUT_INTERVAL} < GetTime<std::chrono::microseconds>()) {
- // We use mockable time for ping timeouts. This means that setmocktime
- // may cause pings to time out for peers that have been connected for
- // longer than m_peer_connect_timeout.
- LogPrint(BCLog::NET, "ping timeout: %fs peer=%d\n", 0.000001 * count_microseconds(GetTime<std::chrono::microseconds>() - node.m_ping_start.load()), node.GetId());
- return true;
- }
-
if (!node.fSuccessfullyConnected) {
LogPrint(BCLog::NET, "version handshake timeout peer=%d\n", node.GetId());
return true;