Bitcoin Core 28.99.0
P2P Digital Currency
Functions | Variables
random.cpp File Reference
#include <test/util/random.h>
#include <logging.h>
#include <uint256.h>
#include <util/check.h>
#include <cstdlib>
#include <iostream>
Include dependency graph for random.cpp:

Go to the source code of this file.

Functions

void MakeRandDeterministicDANGEROUS (const uint256 &seed) noexcept
 Internal function to set g_determinstic_rng. More...
 
void SeedRandomStateForTest (SeedRand seedtype)
 Seed the global RNG state for testing and log the seed value. More...
 

Variables

std::atomic< bool > g_seeded_g_prng_zero {false}
 

Function Documentation

◆ MakeRandDeterministicDANGEROUS()

void MakeRandDeterministicDANGEROUS ( const uint256 seed)
noexcept

Internal function to set g_determinstic_rng.

Only accessed from tests.

Definition at line 670 of file random.cpp.

Here is the caller graph for this function:

◆ SeedRandomStateForTest()

void SeedRandomStateForTest ( SeedRand  seed)

Seed the global RNG state for testing and log the seed value.

This affects all randomness, except GetStrongRandBytes().

Definition at line 19 of file random.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_seeded_g_prng_zero

std::atomic<bool> g_seeded_g_prng_zero {false}

Definition at line 15 of file random.cpp.