diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2019-11-05 10:54:20 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2019-11-12 15:35:26 -0800 |
commit | d1c02775aa74a0610809ac54bb241ddad61d2d8c (patch) | |
tree | 13e7fe1e6c46f0870f0e308c72d7957717be95fe /src/random.cpp | |
parent | 64e1e022cedf6776c5dffd488ca2e766adca5dc3 (diff) |
Report amount of data gathered from environment
Diffstat (limited to 'src/random.cpp')
-rw-r--r-- | src/random.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/random.cpp b/src/random.cpp index 2847aacf6f..3e6398f7b4 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -525,7 +525,9 @@ static void SeedPeriodic(CSHA512& hasher, RNGState& rng) SeedTimestamp(hasher); // Dynamic environment data (performance monitoring, ...) + auto old_size = hasher.Size(); RandAddDynamicEnv(hasher); + LogPrintf("Feeding %i bytes of dynamic environment data into RNG\n", hasher.Size() - old_size); // Strengthen for 10 ms SeedStrengthen(hasher, rng, 10000); @@ -540,10 +542,12 @@ static void SeedStartup(CSHA512& hasher, RNGState& rng) noexcept SeedSlow(hasher); // Dynamic environment data (performance monitoring, ...) + auto old_size = hasher.Size(); RandAddDynamicEnv(hasher); // Static environment data RandAddStaticEnv(hasher); + LogPrintf("Feeding %i bytes of environment data into RNG\n", hasher.Size() - old_size); // Strengthen for 100 ms SeedStrengthen(hasher, rng, 100000); |