diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-10-07 13:22:51 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-10-07 13:22:02 +0200 |
commit | fadf1186c899f45787a91c28120b0608bdc6c246 (patch) | |
tree | d7510161aa389dcbd0b7ed911cb5249c587f258a /src/net.cpp | |
parent | c0b6c96eee7c9e24b78935516225259e61cdabf7 (diff) |
p2p: Use mocktime for ping timeout
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 3 |
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; } |