diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-11-07 13:42:52 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-11-07 13:49:25 +0100 |
commit | 65e3a1e76202b9a695fc6319dbd527ac563e0895 (patch) | |
tree | 4346296f76f3f17b5f3c0120c79f166da64c489f /src/random.h | |
parent | 9ea87f9e187da41964c3cafdadf54b2f767c3450 (diff) |
Make sure that GetRandomBytes never fails
We're using GetRandomBytes in several contexts where it's either
unwieldy to return an error, or an error would mean a fatal exception
anyhow.
@gmaxwell checked OpenSSL a while ago and discovered that it never
actually fails, but it can't hurt to be a bit paranoid here.
Diffstat (limited to 'src/random.h')
-rw-r--r-- | src/random.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/random.h b/src/random.h index 161ebe8986..ec73d910c4 100644 --- a/src/random.h +++ b/src/random.h @@ -19,7 +19,7 @@ void RandAddSeedPerfmon(); /** * Functions to gather random data via the OpenSSL PRNG */ -bool GetRandBytes(unsigned char* buf, int num); +void GetRandBytes(unsigned char* buf, int num); uint64_t GetRand(uint64_t nMax); int GetRandInt(int nMax); uint256 GetRandHash(); |