From c3c1e15831c463df7968b028a77e787da7e6256d Mon Sep 17 00:00:00 2001 From: glozow Date: Wed, 13 Mar 2024 11:45:33 +0000 Subject: [PATCH] [doc] restore comment about why we check if ptx HasWitness before caching rejected txid --- src/net_processing.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 07ac1cfec71..577ed5cd3fb 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());