mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02: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:
parent
2ee918d121
commit
001a53d742
8 changed files with 31 additions and 30 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue