diff options
| author | Philip Kaufmann <[email protected]> | 2014-06-24 14:27:32 +0200 |
|---|---|---|
| committer | Philip Kaufmann <[email protected]> | 2014-07-09 09:42:18 +0200 |
| commit | 001a53d7427dcbcceef3c6754d9cca19df6dafa1 (patch) | |
| tree | c599b2ecf2358276c8b86524348954b06c5757c4 /src/addrman.h | |
| parent | Merge pull request #4275 (diff) | |
| download | discoin-001a53d7427dcbcceef3c6754d9cca19df6dafa1.tar.xz discoin-001a53d7427dcbcceef3c6754d9cca19df6dafa1.zip | |
add GetRandBytes() as wrapper for RAND_bytes()
- add a small wrapper in util around RAND_bytes() and replace with
GetRandBytes() in the code to log errors from calling RAND_bytes()
- remove OpenSSL header rand.h where no longer needed
Diffstat (limited to 'src/addrman.h')
| -rw-r--r-- | src/addrman.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/addrman.h b/src/addrman.h index c4c296560..c012e3dee 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -16,8 +16,6 @@ #include <stdint.h> #include <vector> -#include <openssl/rand.h> - /** Extended statistics about a CAddress */ class CAddrInfo : public CAddress { @@ -384,7 +382,7 @@ public: CAddrMan() : vRandom(0), vvTried(ADDRMAN_TRIED_BUCKET_COUNT, std::vector<int>(0)), vvNew(ADDRMAN_NEW_BUCKET_COUNT, std::set<int>()) { nKey.resize(32); - RAND_bytes(&nKey[0], 32); + GetRandBytes(&nKey[0], 32); nIdCount = 0; nTried = 0; |