diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 2e45b65dd..6cfa51662 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1786,6 +1786,18 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr } else { + static std::set 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); if (fBlocksOnly) LogPrint("net", "transaction (%s) inv sent in violation of protocol peer=%d\n", inv.hash.ToString(), pfrom->id);