aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorglozow <gloriajzhao@gmail.com>2024-03-13 11:45:33 +0000
committerglozow <gloriajzhao@gmail.com>2024-04-16 10:11:01 +0100
commitc3c1e15831c463df7968b028a77e787da7e6256d (patch)
tree08b0bcc78d548f1441959c2b12dd675a622d91c7 /src/net_processing.cpp
parent6f4da19cc3b1b7cd23cb4be95a6bb9acb79eb3bf (diff)
[doc] restore comment about why we check if ptx HasWitness before caching rejected txid
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 07ac1cfec7..577ed5cd3f 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -3107,6 +3107,8 @@ void PeerManagerImpl::ProcessInvalidTx(NodeId nodeid, const CTransactionRef& ptx
// processing of this transaction in the event that child
// transactions are later received (resulting in
// parent-fetching by txid via the orphan-handling logic).
+ // We only add the txid if it differs from the wtxid, to avoid wasting entries in the
+ // rolling bloom filter.
if (state.GetResult() == TxValidationResult::TX_INPUTS_NOT_STANDARD && ptx->HasWitness()) {
m_recent_rejects.insert(ptx->GetHash().ToUint256());
m_txrequest.ForgetTxHash(ptx->GetHash());