Skip to content

Commit

Permalink
Merge pull request #3153
Browse files Browse the repository at this point in the history
1f3d364 Send multiple inv messages if mempool.size > MAX_INV_SZ (Gavin Andresen)
  • Loading branch information
sipa committed Oct 26, 2013
2 parents 0d09b3e + 1f3d364 commit e213005
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit e213005

Please sign in to comment.