Skip to content

Commit f87f259

Browse files
committed
refactor: fixup named args in txpackage tests
Regression in #24152.
1 parent 864772c commit f87f259

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

src/test/txpackage_tests.cpp

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -616,17 +616,17 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
616616
const CAmount child_value{parent_value - COIN};
617617

618618
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);
623623
CTransactionRef tx_parent = MakeTransactionRef(mtx_parent);
624624
package_cpfp.push_back(tx_parent);
625625

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);
630630
CTransactionRef tx_child = MakeTransactionRef(mtx_child);
631631
package_cpfp.push_back(tx_child);
632632

@@ -688,25 +688,25 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
688688
// This package just pays 200 satoshis total. This would be enough to pay for the child alone,
689689
// but isn't enough for the entire package to meet the 1sat/vbyte minimum.
690690
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);
695695
CTransactionRef tx_parent_cheap = MakeTransactionRef(mtx_parent_cheap);
696696
package_still_too_low.push_back(tx_parent_cheap);
697697

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);
702702
CTransactionRef tx_child_cheap = MakeTransactionRef(mtx_child_cheap);
703703
package_still_too_low.push_back(tx_child_cheap);
704704

705705
// Cheap package should fail with package-fee-too-low.
706706
{
707707
BOOST_CHECK_EQUAL(m_node.mempool->size(), expected_pool_size);
708708
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);
710710
BOOST_CHECK_MESSAGE(submit_package_too_low.m_state.IsInvalid(), "Package validation unexpectedly succeeded");
711711
BOOST_CHECK_EQUAL(submit_package_too_low.m_state.GetResult(), PackageValidationResult::PCKG_POLICY);
712712
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)
728728
// Now that the child's fees have "increased" by 1 BTC, the cheap package should succeed.
729729
{
730730
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);
732732
expected_pool_size += 2;
733733
BOOST_CHECK_MESSAGE(submit_prioritised_package.m_state.IsValid(),
734734
"Package validation unexpectedly failed" << submit_prioritised_package.m_state.GetRejectReason());
@@ -747,25 +747,25 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
747747
// the parent from being accepted.
748748
Package package_rich_parent;
749749
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);
754754
CTransactionRef tx_parent_rich = MakeTransactionRef(mtx_parent_rich);
755755
package_rich_parent.push_back(tx_parent_rich);
756756

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);
761761
CTransactionRef tx_child_poor = MakeTransactionRef(mtx_child_poor);
762762
package_rich_parent.push_back(tx_child_poor);
763763

764764
// Parent pays 1 BTC and child pays none. The parent should be accepted without the child.
765765
{
766766
BOOST_CHECK_EQUAL(m_node.mempool->size(), expected_pool_size);
767767
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);
769769
expected_pool_size += 1;
770770
BOOST_CHECK_MESSAGE(submit_rich_parent.m_state.IsInvalid(), "Package validation unexpectedly succeeded");
771771

0 commit comments

Comments
 (0)