aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2013-10-26 15:14:55 +0200
committerPieter Wuille <[email protected]>2013-10-26 15:15:28 +0200
commite2130051778027c1120b90bf2975b933b2d02034 (patch)
treec01af3f0cdcdfc966fc5a72138314a94f763bbee /src
parentMerge pull request #3144 from Diapolo/message_sendcoinsdialog (diff)
parentSend multiple inv messages if mempool.size > MAX_INV_SZ (diff)
downloaddiscoin-e2130051778027c1120b90bf2975b933b2d02034.tar.xz
discoin-e2130051778027c1120b90bf2975b933b2d02034.zip
Merge pull request #3153
1f3d364 Send multiple inv messages if mempool.size > MAX_INV_SZ (Gavin Andresen)
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 01a1babc7..6ffbc5a44 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3814,8 +3814,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
if ((pfrom->pfilter && pfrom->pfilter->IsRelevantAndUpdate(mempool.lookup(hash), hash)) ||
(!pfrom->pfilter))
vInv.push_back(inv);
- if (vInv.size() == MAX_INV_SZ)
- break;
+ if (vInv.size() == MAX_INV_SZ) {
+ pfrom->PushMessage("inv", vInv);
+ vInv.clear();
+ }
}
if (vInv.size() > 0)
pfrom->PushMessage("inv", vInv);