aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorBen Woosley <[email protected]>2018-08-23 10:02:49 -0700
committerBen Woosley <[email protected]>2020-06-23 00:49:50 -0700
commit57b0c0a93a243769beb306c89560d1eda61f54bd (patch)
treeee6c09517020545eaac7c82a11f958a5fa7fc2a6 /src/net_processing.cpp
parentMerge #19198: test: Check that peers with forcerelay permission are not asked... (diff)
downloaddiscoin-57b0c0a93a243769beb306c89560d1eda61f54bd.tar.xz
discoin-57b0c0a93a243769beb306c89560d1eda61f54bd.zip
Drop CADDR_TIME_VERSION checks now that MIN_PEER_PROTO_VERSION is greater
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 270e415e4..5c14d8852 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -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;
}