diff options
| author | Jeff Garzik <[email protected]> | 2014-09-09 09:26:52 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-09-09 09:26:52 +0200 |
| commit | 540ac4514dbe4e077917bad1750768218ef5f9cf (patch) | |
| tree | ce93352c2e7d7b3c7c3b3e255276b23096804705 /src/main.cpp | |
| parent | Limit CNode::mapAskFor (diff) | |
| download | discoin-540ac4514dbe4e077917bad1750768218ef5f9cf.tar.xz discoin-540ac4514dbe4e077917bad1750768218ef5f9cf.zip | |
Avoid returning many "inv" orphans
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 2e24eb950..21a352f7b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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); + } } } |