aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2020-04-06 19:09:05 +1000
committerJohn Newbery <john@johnnewbery.com>2020-09-24 13:24:10 +0100
commit93826726e76730b061ec4c91d69b2b34ebf98ec9 (patch)
treebfccd6faa19ff1eb730fc54e750e64ea616d482c
parent2599277e9cb51e3619582978cba9bf03325c0cb6 (diff)
downloadbitcoin-93826726e76730b061ec4c91d69b2b34ebf98ec9.tar.xz
ignore non-wtxidrelay compliant invs
-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 106f061d03..50aea0fd0b 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -2314,6 +2314,13 @@ bool ProcessMessage(CNode* pfrom, const std::string& msg_type, CDataStream& vRec
if (interruptMsgProc)
return true;
+ // 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());