| 837 | } |
| 838 | |
| 839 | std::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 | |
| 851 | bool PeerManagerImpl::IsBlockRequested(const uint256& hash) |
| 852 | { |
nothing calls this directly
no test coverage detected