aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-10-07 13:22:51 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-10-07 13:22:02 +0200
commitfadf1186c899f45787a91c28120b0608bdc6c246 (patch)
treed7510161aa389dcbd0b7ed911cb5249c587f258a /src/net.cpp
parentc0b6c96eee7c9e24b78935516225259e61cdabf7 (diff)
p2p: Use mocktime for ping timeout
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 7271ff22b2..ad558dd598 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1295,9 +1295,8 @@ void CConnman::NotifyNumConnectionsChanged()
}
}
-bool CConnman::ShouldRunInactivityChecks(const CNode& node, std::optional<int64_t> now_in) const
+bool CConnman::ShouldRunInactivityChecks(const CNode& node, int64_t now) const
{
- const int64_t now = now_in ? now_in.value() : GetTimeSeconds();
return node.nTimeConnected + m_peer_connect_timeout < now;
}