mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Actually only use filterInventoryKnown with MSG_TX inventory messages.
Previously this logic could erroneously filter a MSG_BLOCK inventory message.
This commit is contained in:
parent
b6a0da45db
commit
d41e44c9ac
16
src/main.cpp
16
src/main.cpp
@ -5510,7 +5510,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
|
||||
vInvWait.reserve(pto->vInventoryToSend.size());
|
||||
BOOST_FOREACH(const CInv& inv, pto->vInventoryToSend)
|
||||
{
|
||||
if (pto->filterInventoryKnown.contains(inv.hash))
|
||||
if (inv.type == MSG_TX && pto->filterInventoryKnown.contains(inv.hash))
|
||||
continue;
|
||||
|
||||
// trickle out tx inv to protect privacy
|
||||
@ -5531,15 +5531,13 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
|
||||
}
|
||||
}
|
||||
|
||||
if (!pto->filterInventoryKnown.contains(inv.hash))
|
||||
pto->filterInventoryKnown.insert(inv.hash);
|
||||
|
||||
vInv.push_back(inv);
|
||||
if (vInv.size() >= 1000)
|
||||
{
|
||||
pto->filterInventoryKnown.insert(inv.hash);
|
||||
vInv.push_back(inv);
|
||||
if (vInv.size() >= 1000)
|
||||
{
|
||||
pto->PushMessage("inv", vInv);
|
||||
vInv.clear();
|
||||
}
|
||||
pto->PushMessage("inv", vInv);
|
||||
vInv.clear();
|
||||
}
|
||||
}
|
||||
pto->vInventoryToSend = vInvWait;
|
||||
|
Loading…
Reference in New Issue
Block a user