aboutsummaryrefslogtreecommitdiff
path: root/src/random.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2018-12-19 01:50:36 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2019-01-16 15:08:03 -0800
commit2d1cc5093949f8ea9487a68724162c8b39035ad8 (patch)
treed51c54e8f9dfd05b4c81ae51a8fffd82cfe53c47 /src/random.cpp
parent6a57ca91da23c6a5d91399ffc7fc09a99b6d4c76 (diff)
Don't log RandAddSeedPerfmon details
These are hard to deal with, as in a follow-up this function can get called before the logging infrastructure is initialized.
Diffstat (limited to 'src/random.cpp')
-rw-r--r--src/random.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/random.cpp b/src/random.cpp
index f8ffda136d..7dacc477d4 100644
--- a/src/random.cpp
+++ b/src/random.cpp
@@ -166,13 +166,13 @@ static void RandAddSeedPerfmon()
if (ret == ERROR_SUCCESS) {
RAND_add(vData.data(), nSize, nSize / 100.0);
memory_cleanse(vData.data(), nSize);
- LogPrint(BCLog::RAND, "%s: %lu bytes\n", __func__, nSize);
} else {
- static bool warned = false; // Warn only once
- if (!warned) {
- LogPrintf("%s: Warning: RegQueryValueExA(HKEY_PERFORMANCE_DATA) failed with code %i\n", __func__, ret);
- warned = true;
- }
+ // Performance data is only a best-effort attempt at improving the
+ // situation when the OS randomness (and other sources) aren't
+ // adequate. As a result, failure to read it is isn't considered critical,
+ // so we don't call RandFailure().
+ // TODO: Add logging when the logger is made functional before global
+ // constructors have been invoked.
}
#endif
}