aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-01-04 11:10:09 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-01-04 17:07:29 +0100
commitfa9f4554ca5e64e7960b74dd0ad8fb1cd7c2f091 (patch)
tree52a9849f66467967cfb8960af48e06339ad691e0 /src/net_processing.cpp
parent53b0450edeaa854dfb756f82354721da19a45ef9 (diff)
downloadbitcoin-fa9f4554ca5e64e7960b74dd0ad8fb1cd7c2f091.tar.xz
refactor: Remove pointless and confusing shift in RelayAddress
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 51aa498fb0..7ef0054630 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1746,8 +1746,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.