@@ -1365,15 +1365,15 @@ void RelayTransaction(const uint256& txid, const CConnman& connman)
13651365 });
13661366}
13671367
1368- static void RelayAddress (const CAddress& addr, bool fReachable , CConnman* connman)
1368+ static void RelayAddress (const CAddress& addr, bool fReachable , const CConnman& connman)
13691369{
13701370 unsigned int nRelayNodes = fReachable ? 2 : 1 ; // limited relaying of addresses outside our network(s)
13711371
13721372 // Relay to a limited number of other nodes
13731373 // Use deterministic randomness to send to the same nodes for 24 hours
13741374 // at a time so the m_addr_knowns of the chosen nodes prevent repeats
13751375 uint64_t hashAddr = addr.GetHash ();
1376- const CSipHasher hasher = connman-> GetDeterministicRandomizer (RANDOMIZER_ID_ADDRESS_RELAY).Write (hashAddr << 32 ).Write ((GetTime () + hashAddr) / (24 * 60 * 60 ));
1376+ const CSipHasher hasher = connman. GetDeterministicRandomizer (RANDOMIZER_ID_ADDRESS_RELAY).Write (hashAddr << 32 ).Write ((GetTime () + hashAddr) / (24 * 60 * 60 ));
13771377 FastRandomContext insecure_rand;
13781378
13791379 std::array<std::pair<uint64_t , CNode*>,2 > best{{{0 , nullptr }, {0 , nullptr }}};
@@ -1398,7 +1398,7 @@ static void RelayAddress(const CAddress& addr, bool fReachable, CConnman* connma
13981398 }
13991399 };
14001400
1401- connman-> ForEachNodeThen (std::move (sortfunc), std::move (pushfunc));
1401+ connman. ForEachNodeThen (std::move (sortfunc), std::move (pushfunc));
14021402}
14031403
14041404void static ProcessGetBlockData (CNode* pfrom, const CChainParams& chainparams, const CInv& inv, CConnman* connman)
@@ -2192,7 +2192,7 @@ bool ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vR
21922192 if (addr.nTime > nSince && !pfrom->fGetAddr && vAddr.size () <= 10 && addr.IsRoutable ())
21932193 {
21942194 // Relay to a limited number of other nodes
2195- RelayAddress (addr, fReachable , connman);
2195+ RelayAddress (addr, fReachable , * connman);
21962196 }
21972197 // Do not store addresses outside our network
21982198 if (fReachable )
0 commit comments