@@ -450,17 +450,7 @@ void LockingCallbackOpenSSL(int mode, int i, const char* file, int line) NO_THRE
450450
451451/* A note on the use of noexcept in the seeding functions below:
452452 *
453- * None of the RNG code should ever throw any exception, with the sole exception
454- * of MilliSleep in SeedSleep, which can (and does) support interruptions which
455- * cause a boost::thread_interrupted to be thrown.
456- *
457- * This means that SeedSleep, and all functions that invoke it are throwing.
458- * However, we know that GetRandBytes() and GetStrongRandBytes() never trigger
459- * this sleeping logic, so they are noexcept. The same is true for all the
460- * GetRand*() functions that use GetRandBytes() indirectly.
461- *
462- * TODO: After moving away from interruptible boost-based thread management,
463- * everything can become noexcept here.
453+ * None of the RNG code should ever throw any exception.
464454 */
465455
466456static void SeedTimestamp (CSHA512& hasher) noexcept
@@ -516,7 +506,7 @@ static void SeedStrengthen(CSHA512& hasher, RNGState& rng, int microseconds) noe
516506 Strengthen (strengthen_seed, microseconds, hasher);
517507}
518508
519- static void SeedPeriodic (CSHA512& hasher, RNGState& rng)
509+ static void SeedPeriodic (CSHA512& hasher, RNGState& rng) noexcept
520510{
521511 // Everything that the 'fast' seeder includes
522512 SeedFast (hasher);
@@ -598,7 +588,7 @@ static void ProcRand(unsigned char* out, int num, RNGLevel level)
598588
599589void GetRandBytes (unsigned char * buf, int num) noexcept { ProcRand (buf, num, RNGLevel::FAST); }
600590void GetStrongRandBytes (unsigned char * buf, int num) noexcept { ProcRand (buf, num, RNGLevel::SLOW); }
601- void RandAddPeriodic () { ProcRand (nullptr , 0 , RNGLevel::PERIODIC); }
591+ void RandAddPeriodic () noexcept { ProcRand (nullptr , 0 , RNGLevel::PERIODIC); }
602592
603593bool g_mock_deterministic_tests{false };
604594
0 commit comments