mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 17fdbefd3f into merged_master (Bitcoin PR bitcoin/bitcoin#23970)
This commit is contained in:
commit
334188e09d
2 changed files with 2 additions and 3 deletions
|
|
@ -1750,8 +1750,8 @@ void PeerManagerImpl::RelayAddress(NodeId originator,
|
|||
// Relay to a limited number of other nodes
|
||||
// Use deterministic randomness to send to the same nodes for 24 hours
|
||||
// at a time so the m_addr_knowns of the chosen nodes prevent repeats
|
||||
uint64_t hashAddr = addr.GetHash();
|
||||
const CSipHasher hasher = m_connman.GetDeterministicRandomizer(RANDOMIZER_ID_ADDRESS_RELAY).Write(hashAddr << 32).Write((GetTime() + hashAddr) / (24 * 60 * 60));
|
||||
const uint64_t hashAddr{addr.GetHash()};
|
||||
const CSipHasher hasher{m_connman.GetDeterministicRandomizer(RANDOMIZER_ID_ADDRESS_RELAY).Write(hashAddr).Write((GetTime() + hashAddr) / (24 * 60 * 60))};
|
||||
FastRandomContext insecure_rand;
|
||||
|
||||
// Relay reachable addresses to 2 peers. Unreachable addresses are relayed randomly to 1 or 2 peers.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue