Merge a2a8e919ee into merged_master (Bitcoin PR bitcoin/bitcoin#24925)

This commit is contained in:
James Dorfman 2024-08-09 18:28:04 +00:00
commit 7effbfd139
13 changed files with 37 additions and 34 deletions

View file

@ -4543,10 +4543,10 @@ void PeerManagerImpl::MaybeSendPing(CNode& node_to, Peer& peer, std::chrono::mic
}
if (pingSend) {
uint64_t nonce = 0;
while (nonce == 0) {
GetRandBytes({(unsigned char*)&nonce, sizeof(nonce)});
}
uint64_t nonce;
do {
nonce = GetRand<uint64_t>();
} while (nonce == 0);
peer.m_ping_queued = false;
peer.m_ping_start = now;
if (node_to.GetCommonVersion() > BIP0031_VERSION) {