aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-09-10 16:47:40 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-09-10 16:52:57 +0200
commitd6af9856b0a3140dfa143cd8261efef91f7f3e76 (patch)
tree7a02fe301e87390d1b2f08fefa6daaa92f0986b4 /src/main.cpp
parentf23869e14bf7710f05f128544f2778dde28a01b7 (diff)
parent540ac4514dbe4e077917bad1750768218ef5f9cf (diff)
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.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index bbe5bd87fb..f063a48fe5 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);
+ }
}
}