diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 5ce7317ab50..8d6b13fe608 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -3029,7 +3029,7 @@ void PeerManagerImpl::ProcessPackageResult(const node::PackageToValidate& packag const auto& senders = package_to_validate.m_senders; if (package_result.m_state.IsInvalid()) { - RecentRejectsReconsiderableFilter().insert(GetPackageHash(package)); + m_txdownloadman.MempoolRejectedPackage(package); } // We currently only expect to process 1-parent-1-child packages. Remove if this changes. if (!Assume(package.size() == 2)) return; diff --git a/src/node/txdownloadman.h b/src/node/txdownloadman.h index 5b797f5d9b1..514e1064101 100644 --- a/src/node/txdownloadman.h +++ b/src/node/txdownloadman.h @@ -168,6 +168,9 @@ public: /** Respond to transaction rejected from mempool */ RejectedTxTodo MempoolRejectedTx(const CTransactionRef& ptx, const TxValidationState& state, NodeId nodeid, bool first_time_failure); + + /** Respond to package rejected from mempool */ + void MempoolRejectedPackage(const Package& package); }; } // namespace node #endif // BITCOIN_NODE_TXDOWNLOADMAN_H diff --git a/src/node/txdownloadman_impl.cpp b/src/node/txdownloadman_impl.cpp index 13000dc5755..4d5bfad68c1 100644 --- a/src/node/txdownloadman_impl.cpp +++ b/src/node/txdownloadman_impl.cpp @@ -79,6 +79,10 @@ RejectedTxTodo TxDownloadManager::MempoolRejectedTx(const CTransactionRef& ptx, { return m_impl->MempoolRejectedTx(ptx, state, nodeid, first_time_failure); } +void TxDownloadManager::MempoolRejectedPackage(const Package& package) +{ + m_impl->MempoolRejectedPackage(package); +} // TxDownloadManagerImpl void TxDownloadManagerImpl::ActiveTipChange() @@ -441,4 +445,9 @@ node::RejectedTxTodo TxDownloadManagerImpl::MempoolRejectedTx(const CTransaction .m_package_to_validate = std::move(package_to_validate) }; } + +void TxDownloadManagerImpl::MempoolRejectedPackage(const Package& package) +{ + RecentRejectsReconsiderableFilter().insert(GetPackageHash(package)); +} } // namespace node diff --git a/src/node/txdownloadman_impl.h b/src/node/txdownloadman_impl.h index 496f2891847..9843c815e18 100644 --- a/src/node/txdownloadman_impl.h +++ b/src/node/txdownloadman_impl.h @@ -166,6 +166,7 @@ public: void MempoolAcceptedTx(const CTransactionRef& tx); RejectedTxTodo MempoolRejectedTx(const CTransactionRef& ptx, const TxValidationState& state, NodeId nodeid, bool first_time_failure); + void MempoolRejectedPackage(const Package& package); }; } // namespace node #endif // BITCOIN_NODE_TXDOWNLOADMAN_IMPL_H