diff --git a/src/random.cpp b/src/random.cpp index 61c6f6f33bc..8e10bd77d07 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -330,6 +330,10 @@ bool Random_SanityCheck() uint64_t stop = GetPerformanceCounter(); if (stop == start) return false; + // We called GetPerformanceCounter. Use it as entropy. + RAND_add((const unsigned char*)&start, sizeof(start), 1); + RAND_add((const unsigned char*)&stop, sizeof(stop), 1); + return true; }