merge bitcoin#23970: Remove pointless and confusing shift in RelayAddress

This commit is contained in:
Kittywhiskers Van Gogh 2022-01-04 11:10:09 +01:00
parent 87205f26b5
commit 6d690ede82
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD
2 changed files with 2 additions and 3 deletions

View File

@ -2228,8 +2228,8 @@ void PeerManagerImpl::RelayAddress(NodeId originator,
// Relay to a limited number of other nodes // Relay to a limited number of other nodes
// Use deterministic randomness to send to the same nodes for 24 hours // 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 // at a time so the m_addr_knowns of the chosen nodes prevent repeats
uint64_t hashAddr = addr.GetHash(); const 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 CSipHasher hasher{m_connman.GetDeterministicRandomizer(RANDOMIZER_ID_ADDRESS_RELAY).Write(hashAddr).Write((GetTime() + hashAddr) / (24 * 60 * 60))};
FastRandomContext insecure_rand; FastRandomContext insecure_rand;
// Relay reachable addresses to 2 peers. Unreachable addresses are relayed randomly to 1 or 2 peers. // Relay reachable addresses to 2 peers. Unreachable addresses are relayed randomly to 1 or 2 peers.

View File

@ -101,7 +101,6 @@ shift-base:arith_uint256.cpp
shift-base:crypto/ shift-base:crypto/
shift-base:hash.cpp shift-base:hash.cpp
shift-base:leveldb/ shift-base:leveldb/
shift-base:net_processing.cpp
shift-base:streams.h shift-base:streams.h
shift-base:test/fuzz/crypto_diff_fuzz_chacha20.cpp shift-base:test/fuzz/crypto_diff_fuzz_chacha20.cpp
shift-base:util/bip32.cpp shift-base:util/bip32.cpp