MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / Reseed

Method Reseed

src/random.cpp:634–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

632FastRandomContext::FastRandomContext(const uint256& seed) noexcept : requires_seed(false), rng(MakeByteSpan(seed)) {}
633
634void FastRandomContext::Reseed(const uint256& seed) noexcept
635{
636 FlushCache();
637 requires_seed = false;
638 rng = {MakeByteSpan(seed)};
639}
640
641bool Random_SanityCheck()
642{

Callers 5

BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
prevector_testerMethod · 0.45
AddrManDeterministicMethod · 0.45
SeedRandomForTestMethod · 0.45

Calls 1

MakeByteSpanFunction · 0.85

Tested by 5

BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
prevector_testerMethod · 0.36
AddrManDeterministicMethod · 0.36
SeedRandomForTestMethod · 0.36