From a148e0f5074837b231b012e180ce9886c1a9918c Mon Sep 17 00:00:00 2001 From: furszy Date: Mon, 28 Jun 2021 23:33:57 -0300 Subject: [PATCH] net_processing: Use constant MAX_ADDR_TO_SEND instead of harcoded value. --- src/net_processing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index b48c65ea55e8e1..e345af8f2a6f87 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1308,7 +1308,7 @@ bool static ProcessMessage(CNode* pfrom, std::string strCommand, CDataStream& vR // Don't want addr from older versions unless seeding if (pfrom->nVersion < CADDR_TIME_VERSION && connman->GetAddressCount() > 1000) return true; - if (vAddr.size() > 1000) { + if (vAddr.size() > MAX_ADDR_TO_SEND) { LOCK(cs_main); Misbehaving(pfrom->GetId(), 20, strprintf("%s message size = %u", strCommand, vAddr.size())); return false;