@ -1878,8 +1878,8 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
auto start = GetTime < std : : chrono : : microseconds > ( ) ;
// Minimum time before next feeler connection (in microseconds).
auto next_feeler = PoissonNextSe nd( start , FEELER_INTERVAL ) ;
auto next_extra_block_relay = PoissonNextSe nd( start , EXTRA_BLOCK_RELAY_ONLY_PEER_INTERVAL ) ;
auto next_feeler = GetExponentialRa nd( start , FEELER_INTERVAL ) ;
auto next_extra_block_relay = GetExponentialRa nd( start , EXTRA_BLOCK_RELAY_ONLY_PEER_INTERVAL ) ;
const bool dnsseed = gArgs . GetBoolArg ( " -dnsseed " , DEFAULT_DNSSEED ) ;
bool add_fixed_seeds = gArgs . GetBoolArg ( " -fixedseeds " , DEFAULT_FIXEDSEEDS ) ;
@ -1999,7 +1999,7 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
//
// This is similar to the logic for trying extra outbound (full-relay)
// peers, except:
// - we do this all the time on a poisson timer, rather than just when
// - we do this all the time on a n exponential timer, rather than just when
// our tip is stale
// - we potentially disconnect our next-youngest block-relay-only peer, if our
// newest block-relay-only peer delivers a block more recently.
@ -2008,10 +2008,10 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
// Because we can promote these connections to block-relay-only
// connections, they do not get their own ConnectionType enum
// (similar to how we deal with extra outbound peers).
next_extra_block_relay = PoissonNextSe nd( now , EXTRA_BLOCK_RELAY_ONLY_PEER_INTERVAL ) ;
next_extra_block_relay = GetExponentialRa nd( now , EXTRA_BLOCK_RELAY_ONLY_PEER_INTERVAL ) ;
conn_type = ConnectionType : : BLOCK_RELAY ;
} else if ( now > next_feeler ) {
next_feeler = PoissonNextSe nd( now , FEELER_INTERVAL ) ;
next_feeler = GetExponentialRa nd( now , FEELER_INTERVAL ) ;
conn_type = ConnectionType : : FEELER ;
fFeeler = true ;
} else {
@ -3064,7 +3064,7 @@ std::chrono::microseconds CConnman::PoissonNextSendInbound(std::chrono::microsec
// 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 = PoissonNextSe nd( now , average_interval ) ;
m_next_send_inv_to_incoming = GetExponentialRa nd( now , average_interval ) ;
}
return m_next_send_inv_to_incoming ;
}