5#ifndef BITCOIN_TEST_UTIL_RANDOM_H
6#define BITCOIN_TEST_UTIL_RANDOM_H
static constexpr CAmount MAX_MONEY
No amount larger than this (in satoshi) is valid.
int64_t CAmount
Amount in satoshis (Can be negative)
I randrange(I range) noexcept
Generate a random integer in the range [0..range), with range > 0.
uint256 rand256() noexcept
generate a random uint256.
bool randbool() noexcept
Generate a random boolean.
uint32_t rand32() noexcept
Generate a random 32-bit integer.
uint64_t randbits(int bits) noexcept
Generate a random (bits)-bit integer.
void SeedRandomForTest(SeedRand seed=SeedRand::SEED)
Seed the RNG for testing.
@ ZEROS
Seed with a compile time constant of zeros.
@ SEED
Use (and report) random seed from environment, or a (truly) random one.
static CAmount InsecureRandMoneyAmount()
static uint64_t InsecureRandRange(uint64_t range)
static uint256 InsecureRand256()
static uint64_t InsecureRandBits(int bits)
static uint32_t InsecureRand32()
FastRandomContext g_insecure_rand_ctx
This global and the helpers that use it are not thread-safe.
static bool InsecureRandBool()