@@ -1602,7 +1602,7 @@ static void RelayAddress(const CAddress& addr, bool fReachable, CConnman* connma
16021602 assert (nRelayNodes <= best.size ());
16031603
16041604 auto sortfunc = [&best, &hasher, nRelayNodes, addr](CNode* pnode) {
1605- if (pnode->nVersion >= CADDR_TIME_VERSION && pnode-> IsAddrRelayPeer () && pnode->IsAddrCompatible (addr)) {
1605+ if (pnode->IsAddrRelayPeer () && pnode->IsAddrCompatible (addr)) {
16061606 uint64_t hashKey = CSipHasher (hasher).Write (pnode->GetId ()).Finalize ();
16071607 for (unsigned int i = 0 ; i < nRelayNodes; i++) {
16081608 if (hashKey > best[i].first ) {
@@ -2762,11 +2762,8 @@ bool ProcessMessage(CNode* pfrom, const std::string& msg_type, CDataStream& vRec
27622762 }
27632763
27642764 // Get recent addresses
2765- if (pfrom->fOneShot || pfrom->nVersion >= CADDR_TIME_VERSION || connman->GetAddressCount () < 1000 )
2766- {
2767- connman->PushMessage (pfrom, CNetMsgMaker (nSendVersion).Make (NetMsgType::GETADDR));
2768- pfrom->fGetAddr = true ;
2769- }
2765+ connman->PushMessage (pfrom, CNetMsgMaker (nSendVersion).Make (NetMsgType::GETADDR));
2766+ pfrom->fGetAddr = true ;
27702767 connman->MarkAddressGood (pfrom->addr );
27712768 }
27722769
@@ -2906,10 +2903,6 @@ bool ProcessMessage(CNode* pfrom, const std::string& msg_type, CDataStream& vRec
29062903
29072904 s >> vAddr;
29082905
2909- // Don't want addr from older versions unless seeding
2910- if (pfrom->nVersion < CADDR_TIME_VERSION && connman->GetAddressCount () > 1000 )
2911- return true ;
2912-
29132906 if (!pfrom->IsAddrRelayPeer ()) {
29142907 return true ;
29152908 }
@@ -2954,7 +2947,6 @@ bool ProcessMessage(CNode* pfrom, const std::string& msg_type, CDataStream& vRec
29542947 pfrom->fGetAddr = false ;
29552948 if (pfrom->fOneShot )
29562949 pfrom->fDisconnect = true ;
2957- statsClient.gauge (" peers.knownAddresses" , connman->GetAddressCount (), 1 .0f );
29582950 return true ;
29592951 }
29602952
0 commit comments