diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-09-10 16:47:40 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-09-10 16:52:57 +0200 |
| commit | d6af9856b0a3140dfa143cd8261efef91f7f3e76 (patch) | |
| tree | 7a02fe301e87390d1b2f08fefa6daaa92f0986b4 /src/main.cpp | |
| parent | Merge pull request #4623 (diff) | |
| parent | Avoid returning many "inv" orphans (diff) | |
| download | discoin-d6af9856b0a3140dfa143cd8261efef91f7f3e76.tar.xz discoin-d6af9856b0a3140dfa143cd8261efef91f7f3e76.zip | |
Merge pull request #4878
540ac45 Avoid returning many "inv" orphans (Jeff Garzik)
d4168c8 Limit CNode::mapAskFor (Wladimir J. van der Laan)
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 bbe5bd87f..f063a48fe 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3641,6 +3641,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); + } } } |