mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
fuzz: Abort when global PRNG is used before SeedRand::ZEROS
This commit is contained in:
@@ -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;
|
||||
}()};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user