Skip to content

Commit c3c1e15

Browse files
committed
[doc] restore comment about why we check if ptx HasWitness before caching rejected txid
1 parent 6f4da19 commit c3c1e15

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/net_processing.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3107,6 +3107,8 @@ void PeerManagerImpl::ProcessInvalidTx(NodeId nodeid, const CTransactionRef& ptx
31073107
// processing of this transaction in the event that child
31083108
// transactions are later received (resulting in
31093109
// parent-fetching by txid via the orphan-handling logic).
3110+
// We only add the txid if it differs from the wtxid, to avoid wasting entries in the
3111+
// rolling bloom filter.
31103112
if (state.GetResult() == TxValidationResult::TX_INPUTS_NOT_STANDARD && ptx->HasWitness()) {
31113113
m_recent_rejects.insert(ptx->GetHash().ToUint256());
31123114
m_txrequest.ForgetTxHash(ptx->GetHash());

0 commit comments

Comments
 (0)