@@ -671,10 +671,13 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
671
671
BOOST_CHECK_EQUAL (m_node.mempool ->size (), expected_pool_size);
672
672
const auto submit_cpfp_deprio = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
673
673
package_cpfp, /* test_accept=*/ false );
674
- BOOST_CHECK_EQUAL (submit_cpfp_deprio.m_state .GetResult (), PackageValidationResult::PCKG_POLICY);
675
- BOOST_CHECK_MESSAGE (submit_cpfp_deprio.m_state .IsInvalid (),
676
- " Package validation unexpectedly succeeded: " << submit_cpfp_deprio.m_state .GetRejectReason ());
677
- BOOST_CHECK (submit_cpfp_deprio.m_tx_results .empty ());
674
+ BOOST_CHECK_EQUAL (submit_cpfp_deprio.m_state .GetResult (), PackageValidationResult::PCKG_TX);
675
+ BOOST_CHECK (submit_cpfp_deprio.m_state .IsInvalid ());
676
+ BOOST_CHECK_EQUAL (submit_cpfp_deprio.m_tx_results .find (tx_parent->GetWitnessHash ())->second .m_state .GetResult (),
677
+ TxValidationResult::TX_MEMPOOL_POLICY);
678
+ BOOST_CHECK_EQUAL (submit_cpfp_deprio.m_tx_results .find (tx_child->GetWitnessHash ())->second .m_state .GetResult (),
679
+ TxValidationResult::TX_MISSING_INPUTS);
680
+ BOOST_CHECK (submit_cpfp_deprio.m_tx_results .find (tx_parent->GetWitnessHash ())->second .m_state .GetRejectReason () == " min relay fee not met" );
678
681
BOOST_CHECK_EQUAL (m_node.mempool ->size (), expected_pool_size);
679
682
const CFeeRate expected_feerate (0 , GetVirtualTransactionSize (*tx_parent) + GetVirtualTransactionSize (*tx_child));
680
683
}
@@ -808,8 +811,8 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
808
811
BOOST_CHECK_MESSAGE (submit_rich_parent.m_state .IsInvalid (), " Package validation unexpectedly succeeded" );
809
812
810
813
// The child would have been validated on its own and failed, then submitted as a "package" of 1.
811
- BOOST_CHECK_EQUAL (submit_rich_parent.m_state .GetResult (), PackageValidationResult::PCKG_POLICY );
812
- BOOST_CHECK_EQUAL (submit_rich_parent.m_state .GetRejectReason (), " package-fee-too-low " );
814
+ BOOST_CHECK_EQUAL (submit_rich_parent.m_state .GetResult (), PackageValidationResult::PCKG_TX );
815
+ BOOST_CHECK_EQUAL (submit_rich_parent.m_state .GetRejectReason (), " transaction failed " );
813
816
814
817
auto it_parent = submit_rich_parent.m_tx_results .find (tx_parent_rich->GetWitnessHash ());
815
818
BOOST_CHECK (it_parent != submit_rich_parent.m_tx_results .end ());
@@ -818,6 +821,11 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
818
821
BOOST_CHECK_MESSAGE (it_parent->second .m_base_fees .value () == high_parent_fee,
819
822
strprintf (" rich parent: expected fee %s, got %s" , high_parent_fee, it_parent->second .m_base_fees .value ()));
820
823
BOOST_CHECK (it_parent->second .m_effective_feerate == CFeeRate (high_parent_fee, GetVirtualTransactionSize (*tx_parent_rich)));
824
+ auto it_child = submit_rich_parent.m_tx_results .find (tx_child_poor->GetWitnessHash ());
825
+ BOOST_CHECK (it_child != submit_rich_parent.m_tx_results .end ());
826
+ BOOST_CHECK_EQUAL (it_child->second .m_result_type , MempoolAcceptResult::ResultType::INVALID);
827
+ BOOST_CHECK_EQUAL (it_child->second .m_state .GetResult (), TxValidationResult::TX_MEMPOOL_POLICY);
828
+ BOOST_CHECK (it_child->second .m_state .GetRejectReason () == " min relay fee not met" );
821
829
822
830
BOOST_CHECK_EQUAL (m_node.mempool ->size (), expected_pool_size);
823
831
BOOST_CHECK (m_node.mempool ->exists (GenTxid::Txid (tx_parent_rich->GetHash ())));
0 commit comments