Skip to content

Commit 6d690ed

Browse files
committed
merge bitcoin#23970: Remove pointless and confusing shift in RelayAddress
1 parent 87205f2 commit 6d690ed

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/net_processing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2228,8 +2228,8 @@ void PeerManagerImpl::RelayAddress(NodeId originator,
22282228
// Relay to a limited number of other nodes
22292229
// Use deterministic randomness to send to the same nodes for 24 hours
22302230
// at a time so the m_addr_knowns of the chosen nodes prevent repeats
2231-
uint64_t hashAddr = addr.GetHash();
2232-
const CSipHasher hasher = m_connman.GetDeterministicRandomizer(RANDOMIZER_ID_ADDRESS_RELAY).Write(hashAddr << 32).Write((GetTime() + hashAddr) / (24 * 60 * 60));
2231+
const uint64_t hashAddr{addr.GetHash()};
2232+
const CSipHasher hasher{m_connman.GetDeterministicRandomizer(RANDOMIZER_ID_ADDRESS_RELAY).Write(hashAddr).Write((GetTime() + hashAddr) / (24 * 60 * 60))};
22332233
FastRandomContext insecure_rand;
22342234

22352235
// Relay reachable addresses to 2 peers. Unreachable addresses are relayed randomly to 1 or 2 peers.

test/sanitizer_suppressions/ubsan

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ shift-base:arith_uint256.cpp
101101
shift-base:crypto/
102102
shift-base:hash.cpp
103103
shift-base:leveldb/
104-
shift-base:net_processing.cpp
105104
shift-base:streams.h
106105
shift-base:test/fuzz/crypto_diff_fuzz_chacha20.cpp
107106
shift-base:util/bip32.cpp

0 commit comments

Comments
 (0)