aboutsummaryrefslogtreecommitdiff
path: root/src/test/txpackage_tests.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-04-07 14:30:44 +0200
committerMarcoFalke <falke.marco@gmail.com>2022-04-07 14:31:21 +0200
commit38d3d0bfc4cae6b31c5ac30f9b0da458bd9a9e57 (patch)
treeead91975fa655b93c0911c391d30a7c4f0bc793d /src/test/txpackage_tests.cpp
parent323d4c09c090a0c74b2fbedfb2cd575f1dd839f3 (diff)
parentf87f25948a3b43d55c74d4f988a6f16f11649341 (diff)
Merge bitcoin/bitcoin#24796: lint: misc updates & fixes
f87f25948a3b43d55c74d4f988a6f16f11649341 refactor: fixup named args in txpackage tests (fanquake) 864772c4f753284964538a83e1419b9338a6d84a lint: mypy 0.942 (fanquake) 38031adee808c6a3f191a03b95403c38d00195dd lint: flake8 4.0.1 (fanquake) eaf712c8019383dfa247dc7b9692bbd423cd01ba lint: codespell 2.1.0 (fanquake) Pull request description: Use newer versions of our lint packages. Fix all the outstanding typos. Fix the failing CI. ACKs for top commit: MarcoFalke: review ACK f87f25948a3b43d55c74d4f988a6f16f11649341 Tree-SHA512: 2c1471c13e088d5b9cdd436ebde40180516ae1dd2a2ea4d2f54214762a0712557d899e73c4cfd32992fe45fce6fdba50ba39254f2c79cd5d1180e873a79b9b22
Diffstat (limited to 'src/test/txpackage_tests.cpp')
-rw-r--r--src/test/txpackage_tests.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/test/txpackage_tests.cpp b/src/test/txpackage_tests.cpp
index e43350344d..079b753304 100644
--- a/src/test/txpackage_tests.cpp
+++ b/src/test/txpackage_tests.cpp
@@ -616,17 +616,17 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
const CAmount child_value{parent_value - COIN};
Package package_cpfp;
- auto mtx_parent = CreateValidMempoolTransaction(/*input_transaction=*/ m_coinbase_txns[0], /*vout=*/ 0,
- /*input_height=*/ 0, /*input_signing_key=*/ coinbaseKey,
- /*output_destination=*/ parent_spk,
- /*output_amount=*/ parent_value, /*submit=*/ false);
+ auto mtx_parent = CreateValidMempoolTransaction(/*input_transaction=*/m_coinbase_txns[0], /*input_vout=*/0,
+ /*input_height=*/0, /*input_signing_key=*/coinbaseKey,
+ /*output_destination=*/parent_spk,
+ /*output_amount=*/parent_value, /*submit=*/false);
CTransactionRef tx_parent = MakeTransactionRef(mtx_parent);
package_cpfp.push_back(tx_parent);
- auto mtx_child = CreateValidMempoolTransaction(/*input_transaction=*/ tx_parent, /*vout=*/ 0,
- /*input_height=*/ 101, /*input_signing_key=*/ child_key,
- /*output_destination=*/ child_spk,
- /*output_amount=*/ child_value, /*submit=*/ false);
+ auto mtx_child = CreateValidMempoolTransaction(/*input_transaction=*/tx_parent, /*input_vout=*/0,
+ /*input_height=*/101, /*input_signing_key=*/child_key,
+ /*output_destination=*/child_spk,
+ /*output_amount=*/child_value, /*submit=*/false);
CTransactionRef tx_child = MakeTransactionRef(mtx_child);
package_cpfp.push_back(tx_child);
@@ -688,17 +688,17 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
// This package just pays 200 satoshis total. This would be enough to pay for the child alone,
// but isn't enough for the entire package to meet the 1sat/vbyte minimum.
Package package_still_too_low;
- auto mtx_parent_cheap = CreateValidMempoolTransaction(/*input_transaction=*/ m_coinbase_txns[1], /*vout=*/ 0,
- /*input_height=*/ 0, /*input_signing_key=*/ coinbaseKey,
- /*output_destination=*/ parent_spk,
- /*output_amount=*/ coinbase_value, /*submit=*/ false);
+ auto mtx_parent_cheap = CreateValidMempoolTransaction(/*input_transaction=*/m_coinbase_txns[1], /*input_vout=*/0,
+ /*input_height=*/0, /*input_signing_key=*/coinbaseKey,
+ /*output_destination=*/parent_spk,
+ /*output_amount=*/coinbase_value, /*submit=*/false);
CTransactionRef tx_parent_cheap = MakeTransactionRef(mtx_parent_cheap);
package_still_too_low.push_back(tx_parent_cheap);
- auto mtx_child_cheap = CreateValidMempoolTransaction(/*input_transaction=*/ tx_parent_cheap, /*vout=*/ 0,
- /*input_height=*/ 101, /* input_signing_key */ child_key,
- /*output_destination=*/ child_spk,
- /*output_amount=*/ coinbase_value - 200, /*submit=*/ false);
+ auto mtx_child_cheap = CreateValidMempoolTransaction(/*input_transaction=*/tx_parent_cheap, /*input_vout=*/0,
+ /*input_height=*/101, /*input_signing_key=*/child_key,
+ /*output_destination=*/child_spk,
+ /*output_amount=*/coinbase_value - 200, /*submit=*/false);
CTransactionRef tx_child_cheap = MakeTransactionRef(mtx_child_cheap);
package_still_too_low.push_back(tx_child_cheap);
@@ -706,7 +706,7 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
{
BOOST_CHECK_EQUAL(m_node.mempool->size(), expected_pool_size);
const auto submit_package_too_low = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
- package_still_too_low, /* test_accept */ false);
+ package_still_too_low, /*test_accept=*/false);
BOOST_CHECK_MESSAGE(submit_package_too_low.m_state.IsInvalid(), "Package validation unexpectedly succeeded");
BOOST_CHECK_EQUAL(submit_package_too_low.m_state.GetResult(), PackageValidationResult::PCKG_POLICY);
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)
// Now that the child's fees have "increased" by 1 BTC, the cheap package should succeed.
{
const auto submit_prioritised_package = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
- package_still_too_low, /*test_accept=*/ false);
+ package_still_too_low, /*test_accept=*/false);
expected_pool_size += 2;
BOOST_CHECK_MESSAGE(submit_prioritised_package.m_state.IsValid(),
"Package validation unexpectedly failed" << submit_prioritised_package.m_state.GetRejectReason());
@@ -747,17 +747,17 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
// the parent from being accepted.
Package package_rich_parent;
const CAmount high_parent_fee{1 * COIN};
- auto mtx_parent_rich = CreateValidMempoolTransaction(/*input_transaction=*/ m_coinbase_txns[2], /*vout=*/ 0,
- /*input_height=*/ 0, /*input_signing_key=*/ coinbaseKey,
- /*output_destination=*/ parent_spk,
- /*output_amount=*/ coinbase_value - high_parent_fee, /*submit=*/ false);
+ auto mtx_parent_rich = CreateValidMempoolTransaction(/*input_transaction=*/m_coinbase_txns[2], /*input_vout=*/0,
+ /*input_height=*/0, /*input_signing_key=*/coinbaseKey,
+ /*output_destination=*/parent_spk,
+ /*output_amount=*/coinbase_value - high_parent_fee, /*submit=*/false);
CTransactionRef tx_parent_rich = MakeTransactionRef(mtx_parent_rich);
package_rich_parent.push_back(tx_parent_rich);
- auto mtx_child_poor = CreateValidMempoolTransaction(/*input_transaction=*/ tx_parent_rich, /*vout=*/ 0,
- /*input_height=*/ 101, /*input_signing_key=*/ child_key,
- /*output_destination=*/ child_spk,
- /*output_amount=*/ coinbase_value - high_parent_fee, /*submit=*/ false);
+ auto mtx_child_poor = CreateValidMempoolTransaction(/*input_transaction=*/tx_parent_rich, /*input_vout=*/0,
+ /*input_height=*/101, /*input_signing_key=*/child_key,
+ /*output_destination=*/child_spk,
+ /*output_amount=*/coinbase_value - high_parent_fee, /*submit=*/false);
CTransactionRef tx_child_poor = MakeTransactionRef(mtx_child_poor);
package_rich_parent.push_back(tx_child_poor);
@@ -765,7 +765,7 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
{
BOOST_CHECK_EQUAL(m_node.mempool->size(), expected_pool_size);
const auto submit_rich_parent = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
- package_rich_parent, /* test_accept */ false);
+ package_rich_parent, /*test_accept=*/false);
expected_pool_size += 1;
BOOST_CHECK_MESSAGE(submit_rich_parent.m_state.IsInvalid(), "Package validation unexpectedly succeeded");