Don't respond with getdata for legacy inv types when spork15 is active (#2528)
Avoid unnecessary traffic from non-upgraded nodes.
This commit is contained in:
parent
d2ca9eddee
commit
19a6f718d3
@ -1786,6 +1786,18 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
static std::set<int> legacyMNObjs = {
|
||||||
|
MSG_MASTERNODE_PAYMENT_VOTE,
|
||||||
|
MSG_MASTERNODE_PAYMENT_BLOCK,
|
||||||
|
MSG_MASTERNODE_ANNOUNCE,
|
||||||
|
MSG_MASTERNODE_PING,
|
||||||
|
MSG_MASTERNODE_VERIFY,
|
||||||
|
};
|
||||||
|
if (legacyMNObjs.count(inv.type) && deterministicMNManager->IsDeterministicMNsSporkActive()) {
|
||||||
|
LogPrint("net", "ignoring (%s) inv of legacy type %d peer=%d\n", inv.hash.ToString(), inv.type, pfrom->id);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
pfrom->AddInventoryKnown(inv);
|
pfrom->AddInventoryKnown(inv);
|
||||||
if (fBlocksOnly)
|
if (fBlocksOnly)
|
||||||
LogPrint("net", "transaction (%s) inv sent in violation of protocol peer=%d\n", inv.hash.ToString(), pfrom->id);
|
LogPrint("net", "transaction (%s) inv sent in violation of protocol peer=%d\n", inv.hash.ToString(), pfrom->id);
|
||||||
|
Loading…
Reference in New Issue
Block a user