fuzz: Abort when global PRNG is used before SeedRand::ZEROS

This commit is contained in:
MarcoFalke
2024-12-20 16:15:32 +01:00
parent 433412fd84
commit fa3c787b62
3 changed files with 10 additions and 6 deletions

View File

@@ -79,7 +79,9 @@ constexpr inline auto TEST_DIR_PATH_ELEMENT{"test_common bitcoin"}; // Includes
static FastRandomContext g_rng_temp_path;
static const bool g_rng_temp_path_init{[] {
// Must be initialized before any SeedRandomForTest
Assert(!g_used_g_prng);
(void)g_rng_temp_path.rand64();
g_used_g_prng = false;
return true;
}()};