diff --git a/src/random.cpp b/src/random.cpp index ae25bee1b..0ba0de908 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -47,15 +47,16 @@ void RandAddSeedPerfmon() { RandAddSeed(); +#ifdef WIN32 + // Don't need this on Linux, OpenSSL automatically uses /dev/urandom + // Seed with the entire set of perfmon data + // This can take up to 2 seconds, so only do it every 10 minutes static int64_t nLastPerfmon; if (GetTime() < nLastPerfmon + 10 * 60) return; nLastPerfmon = GetTime(); -#ifdef WIN32 - // Don't need this on Linux, OpenSSL automatically uses /dev/urandom - // Seed with the entire set of perfmon data std::vector vData(250000, 0); long ret = 0; unsigned long nSize = 0;