mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Send multiple inv messages if mempool.size > MAX_INV_SZ
Changes the response to the 'mempool' command so that if the memory pool has more than MAX_INV_SZ transactions (50,000) it will respond with multiple 'inv' messages.
This commit is contained in:
parent
0d09b3e8b0
commit
1f3d3647ff
@ -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…
Reference in New Issue
Block a user