aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2020-04-06 19:09:05 +1000
committerSuhas Daftuar <sdaftuar@gmail.com>2020-07-19 02:05:42 -0400
commit2d282e0cba9761574b6b43d134ca95f3052d7fd2 (patch)
tree7372513b1bba00e6f0499e85b63c21a537d316c2 /src
parentac88e2eb619821ad7ae1d45d4b40be69051d3999 (diff)
ignore non-wtxidrelay compliant invs
Diffstat (limited to 'src')
-rw-r--r--src/net_processing.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 55c67ed188..f3b34957b1 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -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());