Skip to content

Commit 2d282e0

Browse files
ajtownssdaftuar
authored andcommitted
ignore non-wtxidrelay compliant invs
1 parent ac88e2e commit 2d282e0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/net_processing.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2598,6 +2598,13 @@ void ProcessMessage(
25982598
if (interruptMsgProc)
25992599
return;
26002600

2601+
// ignore INVs that don't match wtxidrelay setting
2602+
if (State(pfrom.GetId())->m_wtxid_relay) {
2603+
if (inv.type == MSG_TX) continue;
2604+
} else {
2605+
if (inv.type == MSG_WTX) continue;
2606+
}
2607+
26012608
bool fAlreadyHave = AlreadyHave(inv, mempool);
26022609
LogPrint(BCLog::NET, "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom.GetId());
26032610

0 commit comments

Comments
 (0)