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

Method SeedRandomForTest

src/test/util/setup_common.h:64–68  ·  view source on GitHub ↗

Seed the global RNG state and m_rng for testing and log the seed value. This affects all randomness, except GetStrongRandBytes(). */

Source from the content-addressed store, hash-verified

62 FastRandomContext m_rng;
63 /** Seed the global RNG state and m_rng for testing and log the seed value. This affects all randomness, except GetStrongRandBytes(). */
64 void SeedRandomForTest(SeedRand seed)
65 {
66 SeedRandomStateForTest(seed);
67 m_rng.Reseed(GetRandHash());
68 }
69
70 explicit BasicTestingSetup(ChainType chainType = ChainType::MAIN, TestOpts = {});
71 ~BasicTestingSetup();

Callers

nothing calls this directly

Calls 3

SeedRandomStateForTestFunction · 0.85
GetRandHashFunction · 0.85
ReseedMethod · 0.45

Tested by

no test coverage detected