mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Merge 5c0cd205a1 into merged_master (Bitcoin PR bitcoin/bitcoin#29625)
This commit is contained in:
parent
e35c518374
commit
8d69f4b94d
44 changed files with 742 additions and 567 deletions
|
|
@ -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};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue