refactor: make GetRand a template, remove GetRandInt

This commit is contained in:
pasta
2022-01-31 19:32:59 +07:00
parent 505ba39665
commit ab1ea29ba1
12 changed files with 34 additions and 31 deletions

View File

@@ -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());