mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
p2p: Use mocktime for ping timeout
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user