diff options
| author | Anthony Towns <[email protected]> | 2020-04-06 19:09:05 +1000 |
|---|---|---|
| committer | Suhas Daftuar <[email protected]> | 2020-07-19 02:05:42 -0400 |
| commit | 2d282e0cba9761574b6b43d134ca95f3052d7fd2 (patch) | |
| tree | 7372513b1bba00e6f0499e85b63c21a537d316c2 /src/net_processing.cpp | |
| parent | Add support for tx-relay via wtxid (diff) | |
| download | discoin-2d282e0cba9761574b6b43d134ca95f3052d7fd2.tar.xz discoin-2d282e0cba9761574b6b43d134ca95f3052d7fd2.zip | |
ignore non-wtxidrelay compliant invs
Diffstat (limited to 'src/net_processing.cpp')
| -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 55c67ed18..f3b34957b 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()); |