| 514 | } |
| 515 | |
| 516 | void 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 | |
| 536 | void SeedStartup(CSHA512& hasher, RNGState& rng) noexcept |
| 537 | { |
no test coverage detected