mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-12 13:43:43 +01:00
sanity: Move OS random to sanity check function
Move the OS random test to a sanity check function that is called every time bitcoind is initialized. Keep `src/test/random_tests.cpp` for the case that later random tests are added, and keep a rudimentary test that just calls the sanity check.
This commit is contained in:
@@ -687,9 +687,15 @@ bool InitSanityCheck(void)
|
||||
InitError("Elliptic curve cryptography sanity check failure. Aborting.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!glibc_sanity_test() || !glibcxx_sanity_test())
|
||||
return false;
|
||||
|
||||
if (!Random_SanityCheck()) {
|
||||
InitError("OS cryptographic RNG sanity check failure. Aborting.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user