random: get rid of GetRand by inlining

This commit is contained in:
Pieter Wuille
2024-06-27 11:40:00 -04:00
parent e2d1f84858
commit ddc184d999
14 changed files with 40 additions and 49 deletions

View File

@@ -85,7 +85,7 @@ public:
LOCK(m_txreconciliation_mutex);
LogPrintLevel(BCLog::TXRECONCILIATION, BCLog::Level::Debug, "Pre-register peer=%d\n", peer_id);
const uint64_t local_salt{GetRand(UINT64_MAX)};
const uint64_t local_salt{FastRandomContext().rand64()};
// We do this exactly once per peer (which are unique by NodeId, see GetNewNodeId) so it's
// safe to assume we don't have this record yet.