@@ -450,17 +450,7 @@ void LockingCallbackOpenSSL(int mode, int i, const char* file, int line) NO_THRE
450
450
451
451
/* A note on the use of noexcept in the seeding functions below:
452
452
*
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.
464
454
*/
465
455
466
456
static void SeedTimestamp (CSHA512& hasher) noexcept
@@ -516,7 +506,7 @@ static void SeedStrengthen(CSHA512& hasher, RNGState& rng, int microseconds) noe
516
506
Strengthen (strengthen_seed, microseconds, hasher);
517
507
}
518
508
519
- static void SeedPeriodic (CSHA512& hasher, RNGState& rng)
509
+ static void SeedPeriodic (CSHA512& hasher, RNGState& rng) noexcept
520
510
{
521
511
// Everything that the 'fast' seeder includes
522
512
SeedFast (hasher);
@@ -598,7 +588,7 @@ static void ProcRand(unsigned char* out, int num, RNGLevel level)
598
588
599
589
void GetRandBytes (unsigned char * buf, int num) noexcept { ProcRand (buf, num, RNGLevel::FAST); }
600
590
void 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); }
602
592
603
593
bool g_mock_deterministic_tests{false };
604
594
0 commit comments