mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
fuzz: Abort when global PRNG is used before SeedRand::ZEROS
This commit is contained in:
parent
433412fd84
commit
fa3c787b62
3 changed files with 10 additions and 6 deletions
|
|
@ -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;
|
||||
}()};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue