mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
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
This commit is contained in:
@@ -4370,7 +4370,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
|
||||
if (pingSend) {
|
||||
uint64_t nonce = 0;
|
||||
while (nonce == 0) {
|
||||
RAND_bytes((unsigned char*)&nonce, sizeof(nonce));
|
||||
GetRandBytes((unsigned char*)&nonce, sizeof(nonce));
|
||||
}
|
||||
pto->fPingQueued = false;
|
||||
pto->nPingUsecStart = GetTimeMicros();
|
||||
|
||||
Reference in New Issue
Block a user