Skip to content

Commit 6119f76

Browse files
committed
Process every MempoolAcceptResult regardless of PackageValidationResult
1 parent 2b482dc commit 6119f76

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/net_processing.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3264,10 +3264,6 @@ void PeerManagerImpl::ProcessPackageResult(const PackageToValidate& package_to_v
32643264
// We currently only expect to process 1-parent-1-child packages. Remove if this changes.
32653265
if (!Assume(package.size() == 2)) return;
32663266

3267-
// No package results to look through for PCKG_POLICY or PCKG_MEMPOOL_ERROR
3268-
if (package_result.m_state.GetResult() == PackageValidationResult::PCKG_POLICY ||
3269-
package_result.m_state.GetResult() == PackageValidationResult::PCKG_MEMPOOL_ERROR) return;
3270-
32713267
// Iterate backwards to erase in-package descendants from the orphanage before they become
32723268
// relevant in AddChildrenToWorkSet.
32733269
auto package_iter = package.rbegin();
@@ -3276,7 +3272,9 @@ void PeerManagerImpl::ProcessPackageResult(const PackageToValidate& package_to_v
32763272
const auto& tx = *package_iter;
32773273
const NodeId nodeid = *senders_iter;
32783274
const auto it_result{package_result.m_tx_results.find(tx->GetWitnessHash())};
3279-
if (Assume(it_result != package_result.m_tx_results.end())) {
3275+
3276+
// It is not guaranteed that a result exists for every transaction.
3277+
if (it_result != package_result.m_tx_results.end()) {
32803278
const auto& tx_result = it_result->second;
32813279
switch (tx_result.m_result_type) {
32823280
case MempoolAcceptResult::ResultType::VALID:

0 commit comments

Comments
 (0)