ignore non-wtxidrelay compliant invs

This commit is contained in:
Anthony Towns 2020-04-06 19:09:05 +10:00 committed by Suhas Daftuar
parent ac88e2eb61
commit 2d282e0cba

View file

@ -2598,6 +2598,13 @@ void ProcessMessage(
if (interruptMsgProc)
return;
// ignore INVs that don't match wtxidrelay setting
if (State(pfrom.GetId())->m_wtxid_relay) {
if (inv.type == MSG_TX) continue;
} else {
if (inv.type == MSG_WTX) continue;
}
bool fAlreadyHave = AlreadyHave(inv, mempool);
LogPrint(BCLog::NET, "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom.GetId());