mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
Merge pull request #3153
1f3d364
Send multiple inv messages if mempool.size > MAX_INV_SZ (Gavin Andresen)
This commit is contained in:
commit
e213005177
1 changed files with 4 additions and 2 deletions
|
@ -3814,8 +3814,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||||
if ((pfrom->pfilter && pfrom->pfilter->IsRelevantAndUpdate(mempool.lookup(hash), hash)) ||
|
if ((pfrom->pfilter && pfrom->pfilter->IsRelevantAndUpdate(mempool.lookup(hash), hash)) ||
|
||||||
(!pfrom->pfilter))
|
(!pfrom->pfilter))
|
||||||
vInv.push_back(inv);
|
vInv.push_back(inv);
|
||||||
if (vInv.size() == MAX_INV_SZ)
|
if (vInv.size() == MAX_INV_SZ) {
|
||||||
break;
|
pfrom->PushMessage("inv", vInv);
|
||||||
|
vInv.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (vInv.size() > 0)
|
if (vInv.size() > 0)
|
||||||
pfrom->PushMessage("inv", vInv);
|
pfrom->PushMessage("inv", vInv);
|
||||||
|
|
Loading…
Add table
Reference in a new issue