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

@@ -5193,7 +5193,7 @@ bool ChainstateManager::ShouldCheckBlockIndex() const
{
// Assert to verify Flatten() has been called.
if (!*Assert(m_options.check_block_index)) return false;
if (GetRand(*m_options.check_block_index) >= 1) return false;
if (FastRandomContext().randrange(*m_options.check_block_index) >= 1) return false;
return true;
}