mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
p2p: Use mocktime for ping timeout
This commit is contained in:
parent
c0b6c96eee
commit
fadf1186c8
6 changed files with 25 additions and 7 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue