MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetRand

Function GetRand

src/random.cpp:588–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

586bool g_mock_deterministic_tests{false};
587
588uint64_t GetRand(uint64_t nMax) noexcept
589{
590 return FastRandomContext(g_mock_deterministic_tests).randrange(nMax);
591}
592
593int GetRandInt(int nMax) noexcept
594{

Callers 15

GetRandIntFunction · 0.85
GetExponentialRandFunction · 0.85
CServiceHashMethod · 0.85
GetRandomDurationFunction · 0.85
checkMethod · 0.85
AppInitMainFunction · 0.85
PriorityComputerMethod · 0.85
ConnectNodeMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
resetMethod · 0.85

Calls 2

FastRandomContextClass · 0.85
randrangeMethod · 0.80

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68