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

@@ -586,16 +586,11 @@ void RandAddEvent(const uint32_t event_info) noexcept { GetRNGState().AddEvent(e
bool g_mock_deterministic_tests{false};
uint64_t GetRand(uint64_t nMax) noexcept
uint64_t GetRandInternal(uint64_t nMax) noexcept
{
return FastRandomContext(g_mock_deterministic_tests).randrange(nMax);
}
int GetRandInt(int nMax) noexcept
{
return GetRand(nMax);
}
uint256 GetRandHash() noexcept
{
uint256 hash;