net: use GetRandMicros for cache expiration

This matches the data type of m_cache_entry_expiration.
pull/29625/head
Pieter Wuille 5 months ago
parent ddc184d999
commit 82de1b80d9

@ -3475,7 +3475,7 @@ std::vector<CAddress> CConnman::GetAddresses(CNode& requestor, size_t max_addres
// nodes to be "terrible" (see IsTerrible()) if the timestamps are older than 30 days,
// max. 24 hours of "penalty" due to cache shouldn't make any meaningful difference
// in terms of the freshness of the response.
cache_entry.m_cache_entry_expiration = current_time + std::chrono::hours(21) + GetRandMillis(std::chrono::hours(6));
cache_entry.m_cache_entry_expiration = current_time + std::chrono::hours(21) + GetRandMicros(std::chrono::hours(6));
}
return cache_entry.m_addrs_response_cache;
}

Loading…
Cancel
Save