Skip to content

Commit e213005

Browse files
committed
Merge pull request #3153
1f3d364 Send multiple inv messages if mempool.size > MAX_INV_SZ (Gavin Andresen)
2 parents 0d09b3e + 1f3d364 commit e213005

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3814,8 +3814,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
38143814
if ((pfrom->pfilter && pfrom->pfilter->IsRelevantAndUpdate(mempool.lookup(hash), hash)) ||
38153815
(!pfrom->pfilter))
38163816
vInv.push_back(inv);
3817-
if (vInv.size() == MAX_INV_SZ)
3818-
break;
3817+
if (vInv.size() == MAX_INV_SZ) {
3818+
pfrom->PushMessage("inv", vInv);
3819+
vInv.clear();
3820+
}
38193821
}
38203822
if (vInv.size() > 0)
38213823
pfrom->PushMessage("inv", vInv);

0 commit comments

Comments
 (0)