From 7cad84929907c4294f07377453aa77887911b486 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 22 Feb 2017 08:02:50 +0100 Subject: 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. --- src/random.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/random.h') diff --git a/src/random.h b/src/random.h index 29de587312..0464bdce14 100644 --- a/src/random.h +++ b/src/random.h @@ -58,4 +58,9 @@ static const ssize_t NUM_OS_RANDOM_BYTES = 32; */ void GetOSRand(unsigned char *ent32); +/** Check that OS randomness is available and returning the requested number + * of bytes. + */ +bool Random_SanityCheck(); + #endif // BITCOIN_RANDOM_H -- cgit v1.2.3