Avoid returning many "inv" orphans

Rebased-From: 540ac45
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
This commit is contained in:
Jeff Garzik 2014-09-09 09:26:52 +02:00 committed by Wladimir J. van der Laan
parent d030936da2
commit 6eb5410d8f
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
1 changed files with 5 additions and 0 deletions

View File

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