@@ -134,7 +134,7 @@ BOOST_FIXTURE_TEST_CASE(package_validation_tests, TestChain100Setup)
134
134
/* output_amount=*/ CAmount (48 * COIN), /* submit=*/ false );
135
135
CTransactionRef tx_child = MakeTransactionRef (mtx_child);
136
136
Package package_parent_child{tx_parent, tx_child};
137
- const auto result_parent_child = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool , package_parent_child, /* test_accept=*/ true );
137
+ const auto result_parent_child = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool , package_parent_child, /* test_accept=*/ true , /* max_sane_feerate= */ CFeeRate ( 0 ) );
138
138
if (auto err_parent_child{CheckPackageMempoolAcceptResult (package_parent_child, result_parent_child, /* expect_valid=*/ true , nullptr )}) {
139
139
BOOST_ERROR (err_parent_child.value ());
140
140
} else {
@@ -153,7 +153,7 @@ BOOST_FIXTURE_TEST_CASE(package_validation_tests, TestChain100Setup)
153
153
CTransactionRef giant_ptx = create_placeholder_tx (999 , 999 );
154
154
BOOST_CHECK (GetVirtualTransactionSize (*giant_ptx) > DEFAULT_ANCESTOR_SIZE_LIMIT_KVB * 1000 );
155
155
Package package_single_giant{giant_ptx};
156
- auto result_single_large = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool , package_single_giant, /* test_accept=*/ true );
156
+ auto result_single_large = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool , package_single_giant, /* test_accept=*/ true , /* max_sane_feerate= */ CFeeRate ( 0 ) );
157
157
if (auto err_single_large{CheckPackageMempoolAcceptResult (package_single_giant, result_single_large, /* expect_valid=*/ false , nullptr )}) {
158
158
BOOST_ERROR (err_single_large.value ());
159
159
} else {
@@ -280,7 +280,7 @@ BOOST_FIXTURE_TEST_CASE(package_submission_tests, TestChain100Setup)
280
280
package_unrelated.emplace_back (MakeTransactionRef (mtx));
281
281
}
282
282
auto result_unrelated_submit = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
283
- package_unrelated, /* test_accept=*/ false );
283
+ package_unrelated, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
284
284
// We don't expect m_tx_results for each transaction when basic sanity checks haven't passed.
285
285
BOOST_CHECK (result_unrelated_submit.m_state .IsInvalid ());
286
286
BOOST_CHECK_EQUAL (result_unrelated_submit.m_state .GetResult (), PackageValidationResult::PCKG_POLICY);
@@ -322,7 +322,7 @@ BOOST_FIXTURE_TEST_CASE(package_submission_tests, TestChain100Setup)
322
322
// 3 Generations is not allowed.
323
323
{
324
324
auto result_3gen_submit = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
325
- package_3gen, /* test_accept=*/ false );
325
+ package_3gen, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
326
326
BOOST_CHECK (result_3gen_submit.m_state .IsInvalid ());
327
327
BOOST_CHECK_EQUAL (result_3gen_submit.m_state .GetResult (), PackageValidationResult::PCKG_POLICY);
328
328
BOOST_CHECK_EQUAL (result_3gen_submit.m_state .GetRejectReason (), " package-not-child-with-parents" );
@@ -339,7 +339,7 @@ BOOST_FIXTURE_TEST_CASE(package_submission_tests, TestChain100Setup)
339
339
CTransactionRef tx_parent_invalid = MakeTransactionRef (mtx_parent_invalid);
340
340
Package package_invalid_parent{tx_parent_invalid, tx_child};
341
341
auto result_quit_early = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
342
- package_invalid_parent, /* test_accept=*/ false );
342
+ package_invalid_parent, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
343
343
if (auto err_parent_invalid{CheckPackageMempoolAcceptResult (package_invalid_parent, result_quit_early, /* expect_valid=*/ false , m_node.mempool .get ())}) {
344
344
BOOST_ERROR (err_parent_invalid.value ());
345
345
} else {
@@ -360,7 +360,7 @@ BOOST_FIXTURE_TEST_CASE(package_submission_tests, TestChain100Setup)
360
360
package_missing_parent.push_back (MakeTransactionRef (mtx_child));
361
361
{
362
362
const auto result_missing_parent = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
363
- package_missing_parent, /* test_accept=*/ false );
363
+ package_missing_parent, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
364
364
BOOST_CHECK (result_missing_parent.m_state .IsInvalid ());
365
365
BOOST_CHECK_EQUAL (result_missing_parent.m_state .GetResult (), PackageValidationResult::PCKG_POLICY);
366
366
BOOST_CHECK_EQUAL (result_missing_parent.m_state .GetRejectReason (), " package-not-child-with-unconfirmed-parents" );
@@ -370,7 +370,7 @@ BOOST_FIXTURE_TEST_CASE(package_submission_tests, TestChain100Setup)
370
370
// Submit package with parent + child.
371
371
{
372
372
const auto submit_parent_child = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
373
- package_parent_child, /* test_accept=*/ false );
373
+ package_parent_child, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
374
374
expected_pool_size += 2 ;
375
375
BOOST_CHECK_MESSAGE (submit_parent_child.m_state .IsValid (),
376
376
" Package validation unexpectedly failed: " << submit_parent_child.m_state .GetRejectReason ());
@@ -392,7 +392,7 @@ BOOST_FIXTURE_TEST_CASE(package_submission_tests, TestChain100Setup)
392
392
// Already-in-mempool transactions should be detected and de-duplicated.
393
393
{
394
394
const auto submit_deduped = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
395
- package_parent_child, /* test_accept=*/ false );
395
+ package_parent_child, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
396
396
if (auto err_deduped{CheckPackageMempoolAcceptResult (package_parent_child, submit_deduped, /* expect_valid=*/ true , m_node.mempool .get ())}) {
397
397
BOOST_ERROR (err_deduped.value ());
398
398
} else {
@@ -464,15 +464,15 @@ BOOST_FIXTURE_TEST_CASE(package_witness_swap_tests, TestChain100Setup)
464
464
{
465
465
Package package_parent_child1{ptx_parent, ptx_child1};
466
466
const auto submit_witness1 = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
467
- package_parent_child1, /* test_accept=*/ false );
467
+ package_parent_child1, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
468
468
if (auto err_witness1{CheckPackageMempoolAcceptResult (package_parent_child1, submit_witness1, /* expect_valid=*/ true , m_node.mempool .get ())}) {
469
469
BOOST_ERROR (err_witness1.value ());
470
470
}
471
471
472
472
// Child2 would have been validated individually.
473
473
Package package_parent_child2{ptx_parent, ptx_child2};
474
474
const auto submit_witness2 = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
475
- package_parent_child2, /* test_accept=*/ false );
475
+ package_parent_child2, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
476
476
if (auto err_witness2{CheckPackageMempoolAcceptResult (package_parent_child2, submit_witness2, /* expect_valid=*/ true , m_node.mempool .get ())}) {
477
477
BOOST_ERROR (err_witness2.value ());
478
478
} else {
@@ -486,7 +486,7 @@ BOOST_FIXTURE_TEST_CASE(package_witness_swap_tests, TestChain100Setup)
486
486
// Deduplication should work when wtxid != txid. Submit package with the already-in-mempool
487
487
// transactions again, which should not fail.
488
488
const auto submit_segwit_dedup = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
489
- package_parent_child1, /* test_accept=*/ false );
489
+ package_parent_child1, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
490
490
if (auto err_segwit_dedup{CheckPackageMempoolAcceptResult (package_parent_child1, submit_segwit_dedup, /* expect_valid=*/ true , m_node.mempool .get ())}) {
491
491
BOOST_ERROR (err_segwit_dedup.value ());
492
492
} else {
@@ -517,7 +517,7 @@ BOOST_FIXTURE_TEST_CASE(package_witness_swap_tests, TestChain100Setup)
517
517
{
518
518
Package package_child2_grandchild{ptx_child2, ptx_grandchild};
519
519
const auto submit_spend_ignored = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
520
- package_child2_grandchild, /* test_accept=*/ false );
520
+ package_child2_grandchild, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
521
521
if (auto err_spend_ignored{CheckPackageMempoolAcceptResult (package_child2_grandchild, submit_spend_ignored, /* expect_valid=*/ true , m_node.mempool .get ())}) {
522
522
BOOST_ERROR (err_spend_ignored.value ());
523
523
} else {
@@ -616,7 +616,7 @@ BOOST_FIXTURE_TEST_CASE(package_witness_swap_tests, TestChain100Setup)
616
616
// parent3 should be accepted
617
617
// child should be accepted
618
618
{
619
- const auto mixed_result = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool , package_mixed, false );
619
+ const auto mixed_result = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool , package_mixed, false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
620
620
if (auto err_mixed{CheckPackageMempoolAcceptResult (package_mixed, mixed_result, /* expect_valid=*/ true , m_node.mempool .get ())}) {
621
621
BOOST_ERROR (err_mixed.value ());
622
622
} else {
@@ -682,7 +682,7 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
682
682
{
683
683
BOOST_CHECK_EQUAL (m_node.mempool ->size (), expected_pool_size);
684
684
const auto submit_cpfp_deprio = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
685
- package_cpfp, /* test_accept=*/ false );
685
+ package_cpfp, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
686
686
if (auto err_cpfp_deprio{CheckPackageMempoolAcceptResult (package_cpfp, submit_cpfp_deprio, /* expect_valid=*/ false , m_node.mempool .get ())}) {
687
687
BOOST_ERROR (err_cpfp_deprio.value ());
688
688
} else {
@@ -704,7 +704,7 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
704
704
{
705
705
BOOST_CHECK_EQUAL (m_node.mempool ->size (), expected_pool_size);
706
706
const auto submit_cpfp = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
707
- package_cpfp, /* test_accept=*/ false );
707
+ package_cpfp, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
708
708
if (auto err_cpfp{CheckPackageMempoolAcceptResult (package_cpfp, submit_cpfp, /* expect_valid=*/ true , m_node.mempool .get ())}) {
709
709
BOOST_ERROR (err_cpfp.value ());
710
710
} else {
@@ -756,7 +756,7 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
756
756
// Cheap package should fail for being too low fee.
757
757
{
758
758
const auto submit_package_too_low = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
759
- package_still_too_low, /* test_accept=*/ false );
759
+ package_still_too_low, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
760
760
if (auto err_package_too_low{CheckPackageMempoolAcceptResult (package_still_too_low, submit_package_too_low, /* expect_valid=*/ false , m_node.mempool .get ())}) {
761
761
BOOST_ERROR (err_package_too_low.value ());
762
762
} else {
@@ -782,7 +782,7 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
782
782
// Now that the child's fees have "increased" by 1 BTC, the cheap package should succeed.
783
783
{
784
784
const auto submit_prioritised_package = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
785
- package_still_too_low, /* test_accept=*/ false );
785
+ package_still_too_low, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
786
786
if (auto err_prioritised{CheckPackageMempoolAcceptResult (package_still_too_low, submit_prioritised_package, /* expect_valid=*/ true , m_node.mempool .get ())}) {
787
787
BOOST_ERROR (err_prioritised.value ());
788
788
} else {
@@ -830,7 +830,7 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
830
830
{
831
831
BOOST_CHECK_EQUAL (m_node.mempool ->size (), expected_pool_size);
832
832
const auto submit_rich_parent = ProcessNewPackage (m_node.chainman ->ActiveChainstate (), *m_node.mempool ,
833
- package_rich_parent, /* test_accept=*/ false );
833
+ package_rich_parent, /* test_accept=*/ false , /* max_sane_feerate= */ CFeeRate ( 0 ) );
834
834
if (auto err_rich_parent{CheckPackageMempoolAcceptResult (package_rich_parent, submit_rich_parent, /* expect_valid=*/ false , m_node.mempool .get ())}) {
835
835
BOOST_ERROR (err_rich_parent.value ());
836
836
} else {
0 commit comments