|
|
@ -132,7 +132,7 @@ BOOST_FIXTURE_TEST_CASE(package_validation_tests, TestChain100Setup)
|
|
|
|
/*output_amount=*/CAmount(48 * COIN), /*submit=*/false);
|
|
|
|
/*output_amount=*/CAmount(48 * COIN), /*submit=*/false);
|
|
|
|
CTransactionRef tx_child = MakeTransactionRef(mtx_child);
|
|
|
|
CTransactionRef tx_child = MakeTransactionRef(mtx_child);
|
|
|
|
Package package_parent_child{tx_parent, tx_child};
|
|
|
|
Package package_parent_child{tx_parent, tx_child};
|
|
|
|
const auto result_parent_child = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool, package_parent_child, /*test_accept=*/true, /*max_sane_feerate=*/{});
|
|
|
|
const auto result_parent_child = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool, package_parent_child, /*test_accept=*/true, /*client_maxfeerate=*/{});
|
|
|
|
if (auto err_parent_child{CheckPackageMempoolAcceptResult(package_parent_child, result_parent_child, /*expect_valid=*/true, nullptr)}) {
|
|
|
|
if (auto err_parent_child{CheckPackageMempoolAcceptResult(package_parent_child, result_parent_child, /*expect_valid=*/true, nullptr)}) {
|
|
|
|
BOOST_ERROR(err_parent_child.value());
|
|
|
|
BOOST_ERROR(err_parent_child.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -151,7 +151,7 @@ BOOST_FIXTURE_TEST_CASE(package_validation_tests, TestChain100Setup)
|
|
|
|
CTransactionRef giant_ptx = create_placeholder_tx(999, 999);
|
|
|
|
CTransactionRef giant_ptx = create_placeholder_tx(999, 999);
|
|
|
|
BOOST_CHECK(GetVirtualTransactionSize(*giant_ptx) > DEFAULT_ANCESTOR_SIZE_LIMIT_KVB * 1000);
|
|
|
|
BOOST_CHECK(GetVirtualTransactionSize(*giant_ptx) > DEFAULT_ANCESTOR_SIZE_LIMIT_KVB * 1000);
|
|
|
|
Package package_single_giant{giant_ptx};
|
|
|
|
Package package_single_giant{giant_ptx};
|
|
|
|
auto result_single_large = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool, package_single_giant, /*test_accept=*/true, /*max_sane_feerate=*/{});
|
|
|
|
auto result_single_large = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool, package_single_giant, /*test_accept=*/true, /*client_maxfeerate=*/{});
|
|
|
|
if (auto err_single_large{CheckPackageMempoolAcceptResult(package_single_giant, result_single_large, /*expect_valid=*/false, nullptr)}) {
|
|
|
|
if (auto err_single_large{CheckPackageMempoolAcceptResult(package_single_giant, result_single_large, /*expect_valid=*/false, nullptr)}) {
|
|
|
|
BOOST_ERROR(err_single_large.value());
|
|
|
|
BOOST_ERROR(err_single_large.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -275,7 +275,7 @@ BOOST_FIXTURE_TEST_CASE(package_submission_tests, TestChain100Setup)
|
|
|
|
package_unrelated.emplace_back(MakeTransactionRef(mtx));
|
|
|
|
package_unrelated.emplace_back(MakeTransactionRef(mtx));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
auto result_unrelated_submit = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
auto result_unrelated_submit = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_unrelated, /*test_accept=*/false, /*max_sane_feerate=*/{});
|
|
|
|
package_unrelated, /*test_accept=*/false, /*client_maxfeerate=*/{});
|
|
|
|
// We don't expect m_tx_results for each transaction when basic sanity checks haven't passed.
|
|
|
|
// We don't expect m_tx_results for each transaction when basic sanity checks haven't passed.
|
|
|
|
BOOST_CHECK(result_unrelated_submit.m_state.IsInvalid());
|
|
|
|
BOOST_CHECK(result_unrelated_submit.m_state.IsInvalid());
|
|
|
|
BOOST_CHECK_EQUAL(result_unrelated_submit.m_state.GetResult(), PackageValidationResult::PCKG_POLICY);
|
|
|
|
BOOST_CHECK_EQUAL(result_unrelated_submit.m_state.GetResult(), PackageValidationResult::PCKG_POLICY);
|
|
|
@ -315,7 +315,7 @@ BOOST_FIXTURE_TEST_CASE(package_submission_tests, TestChain100Setup)
|
|
|
|
// 3 Generations is not allowed.
|
|
|
|
// 3 Generations is not allowed.
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto result_3gen_submit = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
auto result_3gen_submit = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_3gen, /*test_accept=*/false, /*max_sane_feerate=*/{});
|
|
|
|
package_3gen, /*test_accept=*/false, /*client_maxfeerate=*/{});
|
|
|
|
BOOST_CHECK(result_3gen_submit.m_state.IsInvalid());
|
|
|
|
BOOST_CHECK(result_3gen_submit.m_state.IsInvalid());
|
|
|
|
BOOST_CHECK_EQUAL(result_3gen_submit.m_state.GetResult(), PackageValidationResult::PCKG_POLICY);
|
|
|
|
BOOST_CHECK_EQUAL(result_3gen_submit.m_state.GetResult(), PackageValidationResult::PCKG_POLICY);
|
|
|
|
BOOST_CHECK_EQUAL(result_3gen_submit.m_state.GetRejectReason(), "package-not-child-with-parents");
|
|
|
|
BOOST_CHECK_EQUAL(result_3gen_submit.m_state.GetRejectReason(), "package-not-child-with-parents");
|
|
|
@ -332,7 +332,7 @@ BOOST_FIXTURE_TEST_CASE(package_submission_tests, TestChain100Setup)
|
|
|
|
CTransactionRef tx_parent_invalid = MakeTransactionRef(mtx_parent_invalid);
|
|
|
|
CTransactionRef tx_parent_invalid = MakeTransactionRef(mtx_parent_invalid);
|
|
|
|
Package package_invalid_parent{tx_parent_invalid, tx_child};
|
|
|
|
Package package_invalid_parent{tx_parent_invalid, tx_child};
|
|
|
|
auto result_quit_early = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
auto result_quit_early = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_invalid_parent, /*test_accept=*/ false, /*max_sane_feerate=*/{});
|
|
|
|
package_invalid_parent, /*test_accept=*/ false, /*client_maxfeerate=*/{});
|
|
|
|
if (auto err_parent_invalid{CheckPackageMempoolAcceptResult(package_invalid_parent, result_quit_early, /*expect_valid=*/false, m_node.mempool.get())}) {
|
|
|
|
if (auto err_parent_invalid{CheckPackageMempoolAcceptResult(package_invalid_parent, result_quit_early, /*expect_valid=*/false, m_node.mempool.get())}) {
|
|
|
|
BOOST_ERROR(err_parent_invalid.value());
|
|
|
|
BOOST_ERROR(err_parent_invalid.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -353,7 +353,7 @@ BOOST_FIXTURE_TEST_CASE(package_submission_tests, TestChain100Setup)
|
|
|
|
package_missing_parent.push_back(MakeTransactionRef(mtx_child));
|
|
|
|
package_missing_parent.push_back(MakeTransactionRef(mtx_child));
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const auto result_missing_parent = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
const auto result_missing_parent = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_missing_parent, /*test_accept=*/false, /*max_sane_feerate=*/{});
|
|
|
|
package_missing_parent, /*test_accept=*/false, /*client_maxfeerate=*/{});
|
|
|
|
BOOST_CHECK(result_missing_parent.m_state.IsInvalid());
|
|
|
|
BOOST_CHECK(result_missing_parent.m_state.IsInvalid());
|
|
|
|
BOOST_CHECK_EQUAL(result_missing_parent.m_state.GetResult(), PackageValidationResult::PCKG_POLICY);
|
|
|
|
BOOST_CHECK_EQUAL(result_missing_parent.m_state.GetResult(), PackageValidationResult::PCKG_POLICY);
|
|
|
|
BOOST_CHECK_EQUAL(result_missing_parent.m_state.GetRejectReason(), "package-not-child-with-unconfirmed-parents");
|
|
|
|
BOOST_CHECK_EQUAL(result_missing_parent.m_state.GetRejectReason(), "package-not-child-with-unconfirmed-parents");
|
|
|
@ -363,7 +363,7 @@ BOOST_FIXTURE_TEST_CASE(package_submission_tests, TestChain100Setup)
|
|
|
|
// Submit package with parent + child.
|
|
|
|
// Submit package with parent + child.
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const auto submit_parent_child = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
const auto submit_parent_child = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_parent_child, /*test_accept=*/false, /*max_sane_feerate=*/{});
|
|
|
|
package_parent_child, /*test_accept=*/false, /*client_maxfeerate=*/{});
|
|
|
|
expected_pool_size += 2;
|
|
|
|
expected_pool_size += 2;
|
|
|
|
BOOST_CHECK_MESSAGE(submit_parent_child.m_state.IsValid(),
|
|
|
|
BOOST_CHECK_MESSAGE(submit_parent_child.m_state.IsValid(),
|
|
|
|
"Package validation unexpectedly failed: " << submit_parent_child.m_state.GetRejectReason());
|
|
|
|
"Package validation unexpectedly failed: " << submit_parent_child.m_state.GetRejectReason());
|
|
|
@ -385,7 +385,7 @@ BOOST_FIXTURE_TEST_CASE(package_submission_tests, TestChain100Setup)
|
|
|
|
// Already-in-mempool transactions should be detected and de-duplicated.
|
|
|
|
// Already-in-mempool transactions should be detected and de-duplicated.
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const auto submit_deduped = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
const auto submit_deduped = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_parent_child, /*test_accept=*/false, /*max_sane_feerate=*/{});
|
|
|
|
package_parent_child, /*test_accept=*/false, /*client_maxfeerate=*/{});
|
|
|
|
if (auto err_deduped{CheckPackageMempoolAcceptResult(package_parent_child, submit_deduped, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
if (auto err_deduped{CheckPackageMempoolAcceptResult(package_parent_child, submit_deduped, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
BOOST_ERROR(err_deduped.value());
|
|
|
|
BOOST_ERROR(err_deduped.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -456,7 +456,7 @@ BOOST_FIXTURE_TEST_CASE(package_witness_swap_tests, TestChain100Setup)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Package package_parent_child1{ptx_parent, ptx_child1};
|
|
|
|
Package package_parent_child1{ptx_parent, ptx_child1};
|
|
|
|
const auto submit_witness1 = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
const auto submit_witness1 = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_parent_child1, /*test_accept=*/false, /*max_sane_feerate=*/{});
|
|
|
|
package_parent_child1, /*test_accept=*/false, /*client_maxfeerate=*/{});
|
|
|
|
if (auto err_witness1{CheckPackageMempoolAcceptResult(package_parent_child1, submit_witness1, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
if (auto err_witness1{CheckPackageMempoolAcceptResult(package_parent_child1, submit_witness1, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
BOOST_ERROR(err_witness1.value());
|
|
|
|
BOOST_ERROR(err_witness1.value());
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -464,7 +464,7 @@ BOOST_FIXTURE_TEST_CASE(package_witness_swap_tests, TestChain100Setup)
|
|
|
|
// Child2 would have been validated individually.
|
|
|
|
// Child2 would have been validated individually.
|
|
|
|
Package package_parent_child2{ptx_parent, ptx_child2};
|
|
|
|
Package package_parent_child2{ptx_parent, ptx_child2};
|
|
|
|
const auto submit_witness2 = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
const auto submit_witness2 = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_parent_child2, /*test_accept=*/false, /*max_sane_feerate=*/{});
|
|
|
|
package_parent_child2, /*test_accept=*/false, /*client_maxfeerate=*/{});
|
|
|
|
if (auto err_witness2{CheckPackageMempoolAcceptResult(package_parent_child2, submit_witness2, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
if (auto err_witness2{CheckPackageMempoolAcceptResult(package_parent_child2, submit_witness2, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
BOOST_ERROR(err_witness2.value());
|
|
|
|
BOOST_ERROR(err_witness2.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -478,7 +478,7 @@ BOOST_FIXTURE_TEST_CASE(package_witness_swap_tests, TestChain100Setup)
|
|
|
|
// Deduplication should work when wtxid != txid. Submit package with the already-in-mempool
|
|
|
|
// Deduplication should work when wtxid != txid. Submit package with the already-in-mempool
|
|
|
|
// transactions again, which should not fail.
|
|
|
|
// transactions again, which should not fail.
|
|
|
|
const auto submit_segwit_dedup = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
const auto submit_segwit_dedup = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_parent_child1, /*test_accept=*/false, /*max_sane_feerate=*/{});
|
|
|
|
package_parent_child1, /*test_accept=*/false, /*client_maxfeerate=*/{});
|
|
|
|
if (auto err_segwit_dedup{CheckPackageMempoolAcceptResult(package_parent_child1, submit_segwit_dedup, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
if (auto err_segwit_dedup{CheckPackageMempoolAcceptResult(package_parent_child1, submit_segwit_dedup, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
BOOST_ERROR(err_segwit_dedup.value());
|
|
|
|
BOOST_ERROR(err_segwit_dedup.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -508,7 +508,7 @@ BOOST_FIXTURE_TEST_CASE(package_witness_swap_tests, TestChain100Setup)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Package package_child2_grandchild{ptx_child2, ptx_grandchild};
|
|
|
|
Package package_child2_grandchild{ptx_child2, ptx_grandchild};
|
|
|
|
const auto submit_spend_ignored = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
const auto submit_spend_ignored = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_child2_grandchild, /*test_accept=*/false, /*max_sane_feerate=*/{});
|
|
|
|
package_child2_grandchild, /*test_accept=*/false, /*client_maxfeerate=*/{});
|
|
|
|
if (auto err_spend_ignored{CheckPackageMempoolAcceptResult(package_child2_grandchild, submit_spend_ignored, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
if (auto err_spend_ignored{CheckPackageMempoolAcceptResult(package_child2_grandchild, submit_spend_ignored, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
BOOST_ERROR(err_spend_ignored.value());
|
|
|
|
BOOST_ERROR(err_spend_ignored.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -606,7 +606,7 @@ BOOST_FIXTURE_TEST_CASE(package_witness_swap_tests, TestChain100Setup)
|
|
|
|
// parent3 should be accepted
|
|
|
|
// parent3 should be accepted
|
|
|
|
// child should be accepted
|
|
|
|
// child should be accepted
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const auto mixed_result = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool, package_mixed, false, /*max_sane_feerate=*/{});
|
|
|
|
const auto mixed_result = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool, package_mixed, false, /*client_maxfeerate=*/{});
|
|
|
|
if (auto err_mixed{CheckPackageMempoolAcceptResult(package_mixed, mixed_result, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
if (auto err_mixed{CheckPackageMempoolAcceptResult(package_mixed, mixed_result, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
BOOST_ERROR(err_mixed.value());
|
|
|
|
BOOST_ERROR(err_mixed.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -670,7 +670,7 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BOOST_CHECK_EQUAL(m_node.mempool->size(), expected_pool_size);
|
|
|
|
BOOST_CHECK_EQUAL(m_node.mempool->size(), expected_pool_size);
|
|
|
|
const auto submit_cpfp_deprio = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
const auto submit_cpfp_deprio = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_cpfp, /*test_accept=*/ false, /*max_sane_feerate=*/{});
|
|
|
|
package_cpfp, /*test_accept=*/ false, /*client_maxfeerate=*/{});
|
|
|
|
if (auto err_cpfp_deprio{CheckPackageMempoolAcceptResult(package_cpfp, submit_cpfp_deprio, /*expect_valid=*/false, m_node.mempool.get())}) {
|
|
|
|
if (auto err_cpfp_deprio{CheckPackageMempoolAcceptResult(package_cpfp, submit_cpfp_deprio, /*expect_valid=*/false, m_node.mempool.get())}) {
|
|
|
|
BOOST_ERROR(err_cpfp_deprio.value());
|
|
|
|
BOOST_ERROR(err_cpfp_deprio.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -692,7 +692,7 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BOOST_CHECK_EQUAL(m_node.mempool->size(), expected_pool_size);
|
|
|
|
BOOST_CHECK_EQUAL(m_node.mempool->size(), expected_pool_size);
|
|
|
|
const auto submit_cpfp = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
const auto submit_cpfp = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_cpfp, /*test_accept=*/ false, /*max_sane_feerate=*/{});
|
|
|
|
package_cpfp, /*test_accept=*/ false, /*client_maxfeerate=*/{});
|
|
|
|
if (auto err_cpfp{CheckPackageMempoolAcceptResult(package_cpfp, submit_cpfp, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
if (auto err_cpfp{CheckPackageMempoolAcceptResult(package_cpfp, submit_cpfp, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
BOOST_ERROR(err_cpfp.value());
|
|
|
|
BOOST_ERROR(err_cpfp.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -744,7 +744,7 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
|
|
|
|
// Cheap package should fail for being too low fee.
|
|
|
|
// Cheap package should fail for being too low fee.
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const auto submit_package_too_low = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
const auto submit_package_too_low = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_still_too_low, /*test_accept=*/false, /*max_sane_feerate=*/{});
|
|
|
|
package_still_too_low, /*test_accept=*/false, /*client_maxfeerate=*/{});
|
|
|
|
if (auto err_package_too_low{CheckPackageMempoolAcceptResult(package_still_too_low, submit_package_too_low, /*expect_valid=*/false, m_node.mempool.get())}) {
|
|
|
|
if (auto err_package_too_low{CheckPackageMempoolAcceptResult(package_still_too_low, submit_package_too_low, /*expect_valid=*/false, m_node.mempool.get())}) {
|
|
|
|
BOOST_ERROR(err_package_too_low.value());
|
|
|
|
BOOST_ERROR(err_package_too_low.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -770,7 +770,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.
|
|
|
|
// 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,
|
|
|
|
const auto submit_prioritised_package = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_still_too_low, /*test_accept=*/false, /*max_sane_feerate=*/{});
|
|
|
|
package_still_too_low, /*test_accept=*/false, /*client_maxfeerate=*/{});
|
|
|
|
if (auto err_prioritised{CheckPackageMempoolAcceptResult(package_still_too_low, submit_prioritised_package, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
if (auto err_prioritised{CheckPackageMempoolAcceptResult(package_still_too_low, submit_prioritised_package, /*expect_valid=*/true, m_node.mempool.get())}) {
|
|
|
|
BOOST_ERROR(err_prioritised.value());
|
|
|
|
BOOST_ERROR(err_prioritised.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -818,7 +818,7 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BOOST_CHECK_EQUAL(m_node.mempool->size(), expected_pool_size);
|
|
|
|
BOOST_CHECK_EQUAL(m_node.mempool->size(), expected_pool_size);
|
|
|
|
const auto submit_rich_parent = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
const auto submit_rich_parent = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool,
|
|
|
|
package_rich_parent, /*test_accept=*/false, /*max_sane_feerate=*/{});
|
|
|
|
package_rich_parent, /*test_accept=*/false, /*client_maxfeerate=*/{});
|
|
|
|
if (auto err_rich_parent{CheckPackageMempoolAcceptResult(package_rich_parent, submit_rich_parent, /*expect_valid=*/false, m_node.mempool.get())}) {
|
|
|
|
if (auto err_rich_parent{CheckPackageMempoolAcceptResult(package_rich_parent, submit_rich_parent, /*expect_valid=*/false, m_node.mempool.get())}) {
|
|
|
|
BOOST_ERROR(err_rich_parent.value());
|
|
|
|
BOOST_ERROR(err_rich_parent.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|