p2p: Use mocktime for ping timeout

This commit is contained in:
MarcoFalke
2021-10-07 13:22:51 +02:00
parent c0b6c96eee
commit fadf1186c8
6 changed files with 25 additions and 7 deletions

View File

@@ -942,7 +942,7 @@ public:
std::chrono::microseconds PoissonNextSendInbound(std::chrono::microseconds now, std::chrono::seconds average_interval);
/** Return true if we should disconnect the peer for failing an inactivity check. */
bool ShouldRunInactivityChecks(const CNode& node, std::optional<int64_t> now=std::nullopt) const;
bool ShouldRunInactivityChecks(const CNode& node, int64_t secs_now) const;
private:
struct ListenSocket {