From ea99f5d01e56ab0192d211da1034ffb299876937 Mon Sep 17 00:00:00 2001 From: John Newbery Date: Tue, 14 Dec 2021 10:35:37 +0000 Subject: [net processing] Move PoissonNextSendInbound to PeerManager --- src/net.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/net.cpp') diff --git a/src/net.cpp b/src/net.cpp index 3ce0b8ee81..a3ff6670b8 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -3058,17 +3058,6 @@ bool CConnman::ForNode(NodeId id, std::function func) return found != nullptr && NodeFullyConnected(found) && func(found); } -std::chrono::microseconds CConnman::PoissonNextSendInbound(std::chrono::microseconds now, std::chrono::seconds average_interval) -{ - if (m_next_send_inv_to_incoming.load() < now) { - // If this function were called from multiple threads simultaneously - // it would possible that both update the next send variable, and return a different result to their caller. - // This is not possible in practice as only the net processing thread invokes this function. - m_next_send_inv_to_incoming = GetExponentialRand(now, average_interval); - } - return m_next_send_inv_to_incoming; -} - CSipHasher CConnman::GetDeterministicRandomizer(uint64_t id) const { return CSipHasher(nSeed0, nSeed1).Write(id); -- cgit v1.2.3