#include <consensus/amount.h>
#include <random.h>
#include <uint256.h>
#include <cstdint>
Go to the source code of this file.
◆ SeedRand
Enumerator |
---|
ZEROS | Seed with a compile time constant of zeros.
|
SEED | Call the Seed() helper.
|
Definition at line 28 of file random.h.
◆ InsecureRand256()
◆ InsecureRand32()
static uint32_t InsecureRand32 |
( |
| ) |
|
|
inlinestatic |
◆ InsecureRandBits()
static uint64_t InsecureRandBits |
( |
int |
bits | ) |
|
|
inlinestatic |
◆ InsecureRandBool()
static bool InsecureRandBool |
( |
| ) |
|
|
inlinestatic |
◆ InsecureRandMoneyAmount()
static CAmount InsecureRandMoneyAmount |
( |
| ) |
|
|
inlinestatic |
◆ InsecureRandRange()
static uint64_t InsecureRandRange |
( |
uint64_t |
range | ) |
|
|
inlinestatic |
◆ Seed()
Seed the given random ctx or use the seed passed in via an environment var.
Definition at line 24 of file random.cpp.
◆ SeedInsecureRand()
◆ g_insecure_rand_ctx
This global and the helpers that use it are not thread-safe.
If thread-safety is needed, the global could be made thread_local (given that thread_local is supported on all architectures we support) or a per-thread instance could be used in the multi-threaded test.
Definition at line 14 of file random.cpp.
◆ g_mock_deterministic_tests
bool g_mock_deterministic_tests |
|
extern |
Flag to make GetRand in random.h return the same number.
Definition at line 566 of file random.cpp.