![]() |
Bitcoin Core
25.99.0
P2P Digital Currency
|
#include <test/util/random.h>
#include <logging.h>
#include <uint256.h>
#include <cstdlib>
#include <string>
Go to the source code of this file.
Functions | |
static uint256 | GetUintFromEnv (const std::string &env_name) |
Return the unsigned from the environment var if available, otherwise 0. More... | |
void | Seed (FastRandomContext &ctx) |
Seed the given random ctx or use the seed passed in via an environment var. More... | |
Variables | |
FastRandomContext | g_insecure_rand_ctx |
This global and the helpers that use it are not thread-safe. More... | |
|
static |
Return the unsigned from the environment var if available, otherwise 0.
Definition at line 17 of file random.cpp.
void Seed | ( | FastRandomContext & | ctx | ) |
Seed the given random ctx or use the seed passed in via an environment var.
Definition at line 24 of file random.cpp.
FastRandomContext 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.