| 504 | } |
| 505 | |
| 506 | static void SeedPeriodic(CSHA512& hasher, RNGState& rng) noexcept |
| 507 | { |
| 508 | // Everything that the 'fast' seeder includes |
| 509 | SeedFast(hasher); |
| 510 | |
| 511 | // High-precision timestamp |
| 512 | SeedTimestamp(hasher); |
| 513 | |
| 514 | // Add the events hasher into the mix |
| 515 | rng.SeedEvents(hasher); |
| 516 | |
| 517 | // Dynamic environment data (performance monitoring, ...) |
| 518 | auto old_size = hasher.Size(); |
| 519 | RandAddDynamicEnv(hasher); |
| 520 | LogPrint(BCLog::RAND, "Feeding %i bytes of dynamic environment data into RNG\n", hasher.Size() - old_size); |
| 521 | |
| 522 | // Strengthen for 10 ms |
| 523 | SeedStrengthen(hasher, rng, 10000); |
| 524 | } |
| 525 | |
| 526 | static void SeedStartup(CSHA512& hasher, RNGState& rng) noexcept |
| 527 | { |
no test coverage detected