mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
refactor: make GetRand a template, remove GetRandInt
This commit is contained in:
@@ -2154,7 +2154,7 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
|
||||
|
||||
if (fFeeler) {
|
||||
// Add small amount of random noise before connection to avoid synchronization.
|
||||
int randsleep = GetRandInt(FEELER_SLEEP_WINDOW * 1000);
|
||||
int randsleep = GetRand<int>(FEELER_SLEEP_WINDOW * 1000);
|
||||
if (!interruptNet.sleep_for(std::chrono::milliseconds(randsleep)))
|
||||
return;
|
||||
LogPrint(BCLog::NET, "Making feeler connection to %s\n", addrConnect.ToString());
|
||||
|
||||
Reference in New Issue
Block a user