Merge pull request #3153

1f3d364 Send multiple inv messages if mempool.size > MAX_INV_SZ (Gavin Andresen)
This commit is contained in:
Pieter Wuille 2013-10-26 15:14:55 +02:00
commit e213005177
No known key found for this signature in database
GPG Key ID: 8F653255C87992E0
1 changed files with 4 additions and 2 deletions

View File

@ -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);