Avoid returning many "inv" orphans

This commit is contained in:
Jeff Garzik 2014-09-09 09:26:52 +02:00 committed by Wladimir J. van der Laan
parent d4168c82be
commit 540ac4514d

View File

@ -3639,6 +3639,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
// Track requests for our stuff
g_signals.Inventory(inv.hash);
if (pfrom->nSendSize > (SendBufferSize() * 2)) {
Misbehaving(pfrom->GetId(), 50);
return error("send buffer size() = %u", pfrom->nSendSize);
}
}
}