Merge 5c0cd205a1 into merged_master (Bitcoin PR bitcoin/bitcoin#29625)

This commit is contained in:
ivanlele 2026-03-03 15:43:14 +00:00
parent e35c518374
commit 8d69f4b94d
No known key found for this signature in database
44 changed files with 742 additions and 567 deletions

View file

@ -776,7 +776,7 @@ std::pair<CAddress, NodeSeconds> AddrManImpl::Select_(bool new_only, std::option
const AddrInfo& info{it_found->second};
// With probability GetChance() * chance_factor, return the entry.
if (insecure_rand.randbits(30) < chance_factor * info.GetChance() * (1 << 30)) {
if (insecure_rand.randbits<30>() < chance_factor * info.GetChance() * (1 << 30)) {
LogPrint(BCLog::ADDRMAN, "Selected %s from %s\n", info.ToStringAddrPort(), search_tried ? "tried" : "new");
return {info, info.m_last_try};
}