Skip to content

Commit 0e973d9

Browse files
committed
net: remove redundant max sendbuffer size check
This is left-over from before there was proper accounting. Hitting 2x the sendbuffer size should not be possible.
1 parent 6042587 commit 0e973d9

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/net_processing.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,8 +1059,6 @@ uint32_t GetFetchFlags(CNode* pfrom, CBlockIndex* pprev, const Consensus::Params
10591059

10601060
bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTimeReceived, const CChainParams& chainparams, CConnman& connman, std::atomic<bool>& interruptMsgProc)
10611061
{
1062-
unsigned int nMaxSendBufferSize = connman.GetSendBufferSize();
1063-
10641062
LogPrint("net", "received: %s (%u bytes) peer=%d\n", SanitizeString(strCommand), vRecv.size(), pfrom->id);
10651063
if (IsArgSet("-dropmessagestest") && GetRand(GetArg("-dropmessagestest", 0)) == 0)
10661064
{
@@ -1413,11 +1411,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
14131411

14141412
// Track requests for our stuff
14151413
GetMainSignals().Inventory(inv.hash);
1416-
1417-
if (pfrom->nSendSize > (nMaxSendBufferSize * 2)) {
1418-
Misbehaving(pfrom->GetId(), 50);
1419-
return error("send buffer size() = %u", pfrom->nSendSize);
1420-
}
14211414
}
14221415

14231416
if (!vToFetch.empty())

0 commit comments

Comments
 (0)