@@ -455,17 +455,7 @@ void LockingCallbackOpenSSL(int mode, int i, const char* file, int line) NO_THRE
455
455
456
456
/* A note on the use of noexcept in the seeding functions below:
457
457
*
458
- * None of the RNG code should ever throw any exception, with the sole exception
459
- * of MilliSleep in SeedSleep, which can (and does) support interruptions which
460
- * cause a boost::thread_interrupted to be thrown.
461
- *
462
- * This means that SeedSleep, and all functions that invoke it are throwing.
463
- * However, we know that GetRandBytes() and GetStrongRandBytes() never trigger
464
- * this sleeping logic, so they are noexcept. The same is true for all the
465
- * GetRand*() functions that use GetRandBytes() indirectly.
466
- *
467
- * TODO: After moving away from interruptible boost-based thread management,
468
- * everything can become noexcept here.
458
+ * None of the RNG code should ever throw any exception.
469
459
*/
470
460
471
461
static void SeedTimestamp (CSHA512& hasher) noexcept
@@ -541,7 +531,7 @@ static void SeedStrengthen(CSHA512& hasher, RNGState& rng, int microseconds) noe
541
531
Strengthen (strengthen_seed, microseconds, hasher);
542
532
}
543
533
544
- static void SeedPeriodic (CSHA512& hasher, RNGState& rng)
534
+ static void SeedPeriodic (CSHA512& hasher, RNGState& rng) noexcept
545
535
{
546
536
// Everything that the 'fast' seeder includes
547
537
SeedFast (hasher);
@@ -622,7 +612,7 @@ static void ProcRand(unsigned char* out, int num, RNGLevel level)
622
612
623
613
void GetRandBytes (unsigned char * buf, int num) noexcept { ProcRand (buf, num, RNGLevel::FAST); }
624
614
void GetStrongRandBytes (unsigned char * buf, int num) noexcept { ProcRand (buf, num, RNGLevel::SLOW); }
625
- void RandAddPeriodic () { ProcRand (nullptr , 0 , RNGLevel::PERIODIC); }
615
+ void RandAddPeriodic () noexcept { ProcRand (nullptr , 0 , RNGLevel::PERIODIC); }
626
616
627
617
void RandAddEvent (const uint32_t event_info) {
628
618
LOCK (events_mutex);
0 commit comments