mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
refactor: make GetRand a template, remove GetRandInt
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user