Avoid returning many "inv" orphans

Rebased-from: 540ac4514dbe4e077917bad1750768218ef5f9cf
This commit is contained in:
Jeff Garzik 2014-09-09 09:26:52 +02:00 committed by Warren Togami
parent 4f7e47a64e
commit 056353a2e3

View File

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