MCPcopy Create free account
hub / github.com/ElementsProject/elements / NextInvToInbounds

Method NextInvToInbounds

src/net_processing.cpp:839–849  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

837}
838
839std::chrono::microseconds PeerManagerImpl::NextInvToInbounds(std::chrono::microseconds now,
840 std::chrono::seconds average_interval)
841{
842 if (m_next_inv_to_inbounds.load() < now) {
843 // If this function were called from multiple threads simultaneously
844 // it would possible that both update the next send variable, and return a different result to their caller.
845 // This is not possible in practice as only the net processing thread invokes this function.
846 m_next_inv_to_inbounds = GetExponentialRand(now, average_interval);
847 }
848 return m_next_inv_to_inbounds;
849}
850
851bool PeerManagerImpl::IsBlockRequested(const uint256& hash)
852{

Callers

nothing calls this directly

Calls 2

GetExponentialRandFunction · 0.85
loadMethod · 0.45

Tested by

no test coverage detected