@@ -616,17 +616,17 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
616
616
const CAmount child_value{parent_value - COIN};
617
617
618
618
Package package_cpfp;
619
- auto mtx_parent = CreateValidMempoolTransaction (/* input_transaction=*/ m_coinbase_txns[0 ], /* vout =*/ 0 ,
620
- /* input_height=*/ 0 , /* input_signing_key=*/ coinbaseKey,
621
- /* output_destination=*/ parent_spk,
622
- /* output_amount=*/ parent_value, /* submit=*/ false );
619
+ auto mtx_parent = CreateValidMempoolTransaction (/* input_transaction=*/ m_coinbase_txns[0 ], /* input_vout =*/ 0 ,
620
+ /* input_height=*/ 0 , /* input_signing_key=*/ coinbaseKey,
621
+ /* output_destination=*/ parent_spk,
622
+ /* output_amount=*/ parent_value, /* submit=*/ false );
623
623
CTransactionRef tx_parent = MakeTransactionRef (mtx_parent);
624
624
package_cpfp.push_back (tx_parent);
625
625
626
- auto mtx_child = CreateValidMempoolTransaction (/* input_transaction=*/ tx_parent, /* vout =*/ 0 ,
627
- /* input_height=*/ 101 , /* input_signing_key=*/ child_key,
628
- /* output_destination=*/ child_spk,
629
- /* output_amount=*/ child_value, /* submit=*/ false );
626
+ auto mtx_child = CreateValidMempoolTransaction (/* input_transaction=*/ tx_parent, /* input_vout =*/ 0 ,
627
+ /* input_height=*/ 101 , /* input_signing_key=*/ child_key,
628
+ /* output_destination=*/ child_spk,
629
+ /* output_amount=*/ child_value, /* submit=*/ false );
630
630
CTransactionRef tx_child = MakeTransactionRef (mtx_child);
631
631
package_cpfp.push_back (tx_child);
632
632
@@ -688,25 +688,25 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
688
688
// This package just pays 200 satoshis total. This would be enough to pay for the child alone,
689
689
// but isn't enough for the entire package to meet the 1sat/vbyte minimum.
690
690
Package package_still_too_low;
691
- auto mtx_parent_cheap = CreateValidMempoolTransaction (/* input_transaction=*/ m_coinbase_txns[1 ], /* vout =*/ 0 ,
692
- /* input_height=*/ 0 , /* input_signing_key=*/ coinbaseKey,
693
- /* output_destination=*/ parent_spk,
694
- /* output_amount=*/ coinbase_value, /* submit=*/ false );
691
+ auto mtx_parent_cheap = CreateValidMempoolTransaction (/* input_transaction=*/ m_coinbase_txns[1 ], /* input_vout =*/ 0 ,
692
+ /* input_height=*/ 0 , /* input_signing_key=*/ coinbaseKey,
693
+ /* output_destination=*/ parent_spk,
694
+ /* output_amount=*/ coinbase_value, /* submit=*/ false );
695
695
CTransactionRef tx_parent_cheap = MakeTransactionRef (mtx_parent_cheap);
696
696
package_still_too_low.push_back (tx_parent_cheap);
697
697
698
- auto mtx_child_cheap = CreateValidMempoolTransaction (/* input_transaction=*/ tx_parent_cheap, /* vout =*/ 0 ,
699
- /* input_height=*/ 101 , /* input_signing_key */ child_key,
700
- /* output_destination=*/ child_spk,
701
- /* output_amount=*/ coinbase_value - 200 , /* submit=*/ false );
698
+ auto mtx_child_cheap = CreateValidMempoolTransaction (/* input_transaction=*/ tx_parent_cheap, /* input_vout =*/ 0 ,
699
+ /* input_height=*/ 101 , /* input_signing_key= */ child_key,
700
+ /* output_destination=*/ child_spk,
701
+ /* output_amount=*/ coinbase_value - 200 , /* submit=*/ false );
702
702
CTransactionRef tx_child_cheap = MakeTransactionRef (mtx_child_cheap);
703
703
package_still_too_low.push_back (tx_child_cheap);
704
704
705
705
// Cheap package should fail with package-fee-too-low.
706
706
{
707
707
BOOST_CHECK_EQUAL (m_node.mempool ->size (), expected_pool_size);
708
708
const auto submit_package_too_low = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
709
- package_still_too_low, /* test_accept */ false );
709
+ package_still_too_low, /* test_accept= */ false );
710
710
BOOST_CHECK_MESSAGE (submit_package_too_low.m_state .IsInvalid (), " Package validation unexpectedly succeeded" );
711
711
BOOST_CHECK_EQUAL (submit_package_too_low.m_state .GetResult (), PackageValidationResult::PCKG_POLICY);
712
712
BOOST_CHECK_EQUAL (submit_package_too_low.m_state .GetRejectReason (), " package-fee-too-low" );
@@ -728,7 +728,7 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
728
728
// Now that the child's fees have "increased" by 1 BTC, the cheap package should succeed.
729
729
{
730
730
const auto submit_prioritised_package = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
731
- package_still_too_low, /* test_accept=*/ false );
731
+ package_still_too_low, /* test_accept=*/ false );
732
732
expected_pool_size += 2 ;
733
733
BOOST_CHECK_MESSAGE (submit_prioritised_package.m_state .IsValid (),
734
734
" Package validation unexpectedly failed" << submit_prioritised_package.m_state .GetRejectReason ());
@@ -747,25 +747,25 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
747
747
// the parent from being accepted.
748
748
Package package_rich_parent;
749
749
const CAmount high_parent_fee{1 * COIN};
750
- auto mtx_parent_rich = CreateValidMempoolTransaction (/* input_transaction=*/ m_coinbase_txns[2 ], /* vout =*/ 0 ,
751
- /* input_height=*/ 0 , /* input_signing_key=*/ coinbaseKey,
752
- /* output_destination=*/ parent_spk,
753
- /* output_amount=*/ coinbase_value - high_parent_fee, /* submit=*/ false );
750
+ auto mtx_parent_rich = CreateValidMempoolTransaction (/* input_transaction=*/ m_coinbase_txns[2 ], /* input_vout =*/ 0 ,
751
+ /* input_height=*/ 0 , /* input_signing_key=*/ coinbaseKey,
752
+ /* output_destination=*/ parent_spk,
753
+ /* output_amount=*/ coinbase_value - high_parent_fee, /* submit=*/ false );
754
754
CTransactionRef tx_parent_rich = MakeTransactionRef (mtx_parent_rich);
755
755
package_rich_parent.push_back (tx_parent_rich);
756
756
757
- auto mtx_child_poor = CreateValidMempoolTransaction (/* input_transaction=*/ tx_parent_rich, /* vout =*/ 0 ,
758
- /* input_height=*/ 101 , /* input_signing_key=*/ child_key,
759
- /* output_destination=*/ child_spk,
760
- /* output_amount=*/ coinbase_value - high_parent_fee, /* submit=*/ false );
757
+ auto mtx_child_poor = CreateValidMempoolTransaction (/* input_transaction=*/ tx_parent_rich, /* input_vout =*/ 0 ,
758
+ /* input_height=*/ 101 , /* input_signing_key=*/ child_key,
759
+ /* output_destination=*/ child_spk,
760
+ /* output_amount=*/ coinbase_value - high_parent_fee, /* submit=*/ false );
761
761
CTransactionRef tx_child_poor = MakeTransactionRef (mtx_child_poor);
762
762
package_rich_parent.push_back (tx_child_poor);
763
763
764
764
// Parent pays 1 BTC and child pays none. The parent should be accepted without the child.
765
765
{
766
766
BOOST_CHECK_EQUAL (m_node.mempool ->size (), expected_pool_size);
767
767
const auto submit_rich_parent = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
768
- package_rich_parent, /* test_accept */ false );
768
+ package_rich_parent, /* test_accept= */ false );
769
769
expected_pool_size += 1 ;
770
770
BOOST_CHECK_MESSAGE (submit_rich_parent.m_state .IsInvalid (), " Package validation unexpectedly succeeded" );
771
771
0 commit comments