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

Function SeedPeriodic

src/random.cpp:516–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514}
515
516void SeedPeriodic(CSHA512& hasher, RNGState& rng) noexcept
517{
518 // Everything that the 'fast' seeder includes
519 SeedFast(hasher);
520
521 // High-precision timestamp
522 SeedTimestamp(hasher);
523
524 // Add the events hasher into the mix
525 rng.SeedEvents(hasher);
526
527 // Dynamic environment data (clocks, resource usage, ...)
528 auto old_size = hasher.Size();
529 RandAddDynamicEnv(hasher);
530 LogDebug(BCLog::RAND, "Feeding %i bytes of dynamic environment data into RNG\n", hasher.Size() - old_size);
531
532 // Strengthen for 10 ms
533 SeedStrengthen(hasher, rng, 10ms);
534}
535
536void SeedStartup(CSHA512& hasher, RNGState& rng) noexcept
537{

Callers 1

ProcRandFunction · 0.85

Calls 5

SeedFastFunction · 0.85
SeedTimestampFunction · 0.85
RandAddDynamicEnvFunction · 0.85
SeedStrengthenFunction · 0.85
SizeMethod · 0.45

Tested by

no test coverage detected