diff options
author | Anthony Towns <aj@erisian.com.au> | 2020-04-06 19:09:05 +1000 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2020-09-24 13:24:10 +0100 |
commit | 93826726e76730b061ec4c91d69b2b34ebf98ec9 (patch) | |
tree | bfccd6faa19ff1eb730fc54e750e64ea616d482c | |
parent | 2599277e9cb51e3619582978cba9bf03325c0cb6 (diff) |
ignore non-wtxidrelay compliant invs
-rw-r--r-- | src/net_processing.cpp | 7 |
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()); |