Automatically initialize RNG on first use.

This commit is contained in:
Pieter Wuille
2018-12-17 16:48:21 -08:00
parent 2d1cc50939
commit 05fde14e3a
4 changed files with 56 additions and 22 deletions

View File

@@ -178,7 +178,12 @@ void GetOSRand(unsigned char *ent32);
*/
bool Random_SanityCheck();
/** Initialize the RNG. */
/**
* Initialize global RNG state and log any CPU features that are used.
*
* Calling this function is optional. RNG state will be initialized when first
* needed if it is not called.
*/
void RandomInit();
#endif // BITCOIN_RANDOM_H