@@ -856,9 +856,9 @@ class PeerManagerImpl final : public PeerManager
856856 EXCLUSIVE_LOCKS_REQUIRED(cs_main, !m_recent_confirmed_transactions_mutex);
857857
858858 /* *
859- * Filter for transactions that were recently rejected by
860- * AcceptToMemoryPool. These are not rerequested until the chain tip
861- * changes, at which point the entire filter is reset.
859+ * Filter for transactions that were recently rejected by the mempool.
860+ * These are not rerequested until the chain tip changes, at which point
861+ * the entire filter is reset.
862862 *
863863 * Without this filter we'd be re-requesting txs from each of our peers,
864864 * increasing bandwidth consumption considerably. For instance, with 100
@@ -1816,6 +1816,7 @@ bool PeerManagerImpl::MaybePunishNodeForTx(NodeId nodeid, const TxValidationStat
18161816 case TxValidationResult::TX_PREMATURE_SPEND:
18171817 case TxValidationResult::TX_CONFLICT:
18181818 case TxValidationResult::TX_MEMPOOL_POLICY:
1819+ case TxValidationResult::TX_NO_MEMPOOL:
18191820 // moved from BLOCK
18201821 case TxValidationResult::TX_BAD_SPECIAL:
18211822 case TxValidationResult::TX_CONFLICT_LOCK:
@@ -3039,7 +3040,7 @@ void PeerManagerImpl::ProcessOrphanTx(std::set<uint256>& orphan_work_set)
30393040 const auto [porphanTx, from_peer] = m_orphanage.GetTx (orphanHash);
30403041 if (porphanTx == nullptr ) continue ;
30413042
3042- const MempoolAcceptResult result = AcceptToMemoryPool ( m_chainman.ActiveChainstate (), m_mempool, porphanTx, false /* bypass_limits */ );
3043+ const MempoolAcceptResult result = m_chainman.ProcessTransaction ( porphanTx);
30433044 const TxValidationState& state = result.m_state ;
30443045
30453046 if (result.m_result_type == MempoolAcceptResult::ResultType::VALID) {
@@ -3065,8 +3066,6 @@ void PeerManagerImpl::ProcessOrphanTx(std::set<uint256>& orphan_work_set)
30653066 break ;
30663067 }
30673068 }
3068- CChainState& active_chainstate = m_chainman.ActiveChainstate ();
3069- m_mempool.check (active_chainstate.CoinsTip (), active_chainstate.m_chain .Height () + 1 );
30703069}
30713070
30723071bool PeerManagerImpl::PrepareBlockFilterRequest (CNode& node, Peer& peer,
@@ -4224,7 +4223,7 @@ void PeerManagerImpl::ProcessMessage(
42244223 return ;
42254224 }
42264225
4227- const MempoolAcceptResult result = AcceptToMemoryPool ( m_chainman.ActiveChainstate (), m_mempool, ptx, false /* bypass_limits */ );
4226+ const MempoolAcceptResult result = m_chainman.ProcessTransaction ( ptx);
42284227 const TxValidationState& state = result.m_state ;
42294228
42304229 if (result.m_result_type == MempoolAcceptResult::ResultType::VALID) {
@@ -4235,8 +4234,6 @@ void PeerManagerImpl::ProcessMessage(
42354234 m_cj_ctx->dstxman ->AddDSTX (dstx);
42364235 }
42374236
4238- CChainState& active_chainstate = m_chainman.ActiveChainstate ();
4239- m_mempool.check (active_chainstate.CoinsTip (), active_chainstate.m_chain .Height () + 1 );
42404237 RelayTransaction (tx.GetHash ());
42414238 m_orphanage.AddChildrenToWorkSet (tx, peer->m_orphan_work_set );
42424239
@@ -4308,8 +4305,8 @@ void PeerManagerImpl::ProcessMessage(
43084305 }
43094306
43104307 // If a tx has been detected by m_recent_rejects, we will have reached
4311- // this point and the tx will have been ignored. Because we haven't run
4312- // the tx through AcceptToMemoryPool , we won't have computed a DoS
4308+ // this point and the tx will have been ignored. Because we haven't
4309+ // submitted the tx to our mempool , we won't have computed a DoS
43134310 // score for it or determined exactly why we consider it invalid.
43144311 //
43154312 // This means we won't penalize any peer subsequently relaying a DoSy
0 commit comments