Skip to content

Commit

Permalink
net_processing: Use constant MAX_ADDR_TO_SEND instead of harcoded value.
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Jul 1, 2021
1 parent 3db7fa2 commit 4107da6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4107da6

Please sign in to comment.