diff options
author | merge-script <fanquake@gmail.com> | 2024-05-03 15:31:06 +0800 |
---|---|---|
committer | merge-script <fanquake@gmail.com> | 2024-05-03 15:31:06 +0800 |
commit | 99d7538cdb2a0ab7a7a2116cd5f33b95fc52b00e (patch) | |
tree | 967b56de0cf4709f2ffd3da36ee6941ad2a8e02a /src/test | |
parent | 5127844cabbe50236abc8d55015692515c49315e (diff) | |
parent | 7f6fb73c82fdff2afe5edefcc335ba6707d5627d (diff) | |
download | bitcoin-99d7538cdb2a0ab7a7a2116cd5f33b95fc52b00e.tar.xz |
Merge bitcoin/bitcoin#30012: opportunistic 1p1c followups
7f6fb73c82fdff2afe5edefcc335ba6707d5627d [refactor] use reference in for loop through iters (glozow)
6119f76ef72c1adc55c1a384c20f8ba9e1a01206 Process every MempoolAcceptResult regardless of PackageValidationResult (glozow)
2b482dc1f3fb248ccbe7eeb8c9c07d4bf1295a70 [refactor] have ProcessPackageResult take a PackageToValidate (glozow)
c2ada0530719e044bb498e0d78907a208214a71e [doc] remove redundant PackageToValidate comment (glozow)
9a762efc7a118c44556fa9ad404f6b54103bad41 [txpackages] use std::lexicographical_compare instead of sorting hex strings (glozow)
8496f69e1c2d1961db2604829cb6a289eb8dd3d6 [refactor] make MempoolAcceptResult::m_replaced_transactions non-optional (glozow)
Pull request description:
Followups from #28970:
- https://github.com/bitcoin/bitcoin/pull/28970#discussion_r1568781077
- https://github.com/bitcoin/bitcoin/pull/28970#discussion_r1585554972
- https://github.com/bitcoin/bitcoin/pull/28970#discussion_r1581019326
- https://github.com/bitcoin/bitcoin/pull/28970#discussion_r1581036209
- https://github.com/bitcoin/bitcoin/pull/28970#discussion_r1586258730
ACKs for top commit:
instagibbs:
reACK https://github.com/bitcoin/bitcoin/pull/30012/commits/7f6fb73c82fdff2afe5edefcc335ba6707d5627d
Tree-SHA512: 9d8393d5f2fedbc6ebce582ff2a8ed074a02dd8e7dbf562c14d48b439fdc1ee6c3203b3609366d3c883d44655cc1a5c83a75ca56e490d25c1a34d95a0622d458
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/tx_pool.cpp | 2 | ||||
-rw-r--r-- | src/test/util/txmempool.cpp | 6 |
2 files changed, 0 insertions, 8 deletions
diff --git a/src/test/fuzz/tx_pool.cpp b/src/test/fuzz/tx_pool.cpp index 0b4019d5eb..9f0aedf29b 100644 --- a/src/test/fuzz/tx_pool.cpp +++ b/src/test/fuzz/tx_pool.cpp @@ -139,7 +139,6 @@ void CheckATMPInvariants(const MempoolAcceptResult& res, bool txid_in_mempool, b Assert(wtxid_in_mempool); Assert(res.m_state.IsValid()); Assert(!res.m_state.IsInvalid()); - Assert(res.m_replaced_transactions); Assert(res.m_vsize); Assert(res.m_base_fees); Assert(res.m_effective_feerate); @@ -154,7 +153,6 @@ void CheckATMPInvariants(const MempoolAcceptResult& res, bool txid_in_mempool, b Assert(res.m_state.IsInvalid()); const bool is_reconsiderable{res.m_state.GetResult() == TxValidationResult::TX_RECONSIDERABLE}; - Assert(!res.m_replaced_transactions); Assert(!res.m_vsize); Assert(!res.m_base_fees); // Fee information is provided if the failure is TX_RECONSIDERABLE. diff --git a/src/test/util/txmempool.cpp b/src/test/util/txmempool.cpp index 71cf8aca60..870cdd0b32 100644 --- a/src/test/util/txmempool.cpp +++ b/src/test/util/txmempool.cpp @@ -68,12 +68,6 @@ std::optional<std::string> CheckPackageMempoolAcceptResult(const Package& txns, return strprintf("tx %s unexpectedly failed: %s", wtxid.ToString(), atmp_result.m_state.ToString()); } - //m_replaced_transactions should exist iff the result was VALID - if (atmp_result.m_replaced_transactions.has_value() != valid) { - return strprintf("tx %s result should %shave m_replaced_transactions", - wtxid.ToString(), valid ? "" : "not "); - } - // m_vsize and m_base_fees should exist iff the result was VALID or MEMPOOL_ENTRY const bool mempool_entry{atmp_result.m_result_type == MempoolAcceptResult::ResultType::MEMPOOL_ENTRY}; if (atmp_result.m_base_fees.has_value() != (valid || mempool_entry)) { |