mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
Drop CADDR_TIME_VERSION checks now that MIN_PEER_PROTO_VERSION is greater
This commit is contained in:
@@ -1440,7 +1440,7 @@ static void RelayAddress(const CAddress& addr, bool fReachable, const CConnman&
|
||||
assert(nRelayNodes <= best.size());
|
||||
|
||||
auto sortfunc = [&best, &hasher, nRelayNodes](CNode* pnode) {
|
||||
if (pnode->nVersion >= CADDR_TIME_VERSION && pnode->IsAddrRelayPeer()) {
|
||||
if (pnode->IsAddrRelayPeer()) {
|
||||
uint64_t hashKey = CSipHasher(hasher).Write(pnode->GetId()).Finalize();
|
||||
for (unsigned int i = 0; i < nRelayNodes; i++) {
|
||||
if (hashKey > best[i].first) {
|
||||
@@ -2351,11 +2351,8 @@ void ProcessMessage(
|
||||
}
|
||||
|
||||
// Get recent addresses
|
||||
if (pfrom.fOneShot || pfrom.nVersion >= CADDR_TIME_VERSION || connman->GetAddressCount() < 1000)
|
||||
{
|
||||
connman->PushMessage(&pfrom, CNetMsgMaker(nSendVersion).Make(NetMsgType::GETADDR));
|
||||
pfrom.fGetAddr = true;
|
||||
}
|
||||
connman->PushMessage(&pfrom, CNetMsgMaker(nSendVersion).Make(NetMsgType::GETADDR));
|
||||
pfrom.fGetAddr = true;
|
||||
connman->MarkAddressGood(pfrom.addr);
|
||||
}
|
||||
|
||||
@@ -2445,9 +2442,6 @@ void ProcessMessage(
|
||||
std::vector<CAddress> vAddr;
|
||||
vRecv >> vAddr;
|
||||
|
||||
// Don't want addr from older versions unless seeding
|
||||
if (pfrom.nVersion < CADDR_TIME_VERSION && connman->GetAddressCount() > 1000)
|
||||
return;
|
||||
if (!pfrom.IsAddrRelayPeer()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user