aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2021-12-14 10:35:37 +0000
committerMartin Zumsande <mzumsande@gmail.com>2022-01-13 15:55:01 +0100
commitea99f5d01e56ab0192d211da1034ffb299876937 (patch)
treeac2d9ad1df5486eb188ff69c4665477c3b46ff1b /src/net.cpp
parentbb060746df22c956b8f44e5b8cd1ae4ed73faddc (diff)
downloadbitcoin-ea99f5d01e56ab0192d211da1034ffb299876937.tar.xz
[net processing] Move PoissonNextSendInbound to PeerManager
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp11
1 files changed, 0 insertions, 11 deletions
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<bool(CNode* pnode)> 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);