diff options
author | gzhao408 <gzhao408@berkeley.edu> | 2021-01-19 05:29:40 -0800 |
---|---|---|
committer | gzhao408 <gzhao408@berkeley.edu> | 2021-02-09 07:01:52 -0800 |
commit | f82baf0762f60c2ca5ffc339b095f9271d7c2f33 (patch) | |
tree | 4439a2ad3f6021a62be8bba8a8bf8da6d4b03174 /src/test/validation_block_tests.cpp | |
parent | 9db10a55061e09021ff8ea1d6637d99f7959035f (diff) |
[refactor] return MempoolAcceptResult
This creates a cleaner interface with ATMP, allows us to make results const,
and makes accessing values that don't make sense (e.g. fee when tx is
invalid) an error.
Diffstat (limited to 'src/test/validation_block_tests.cpp')
-rw-r--r-- | src/test/validation_block_tests.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/test/validation_block_tests.cpp b/src/test/validation_block_tests.cpp index ec45d9a434..6c18a9e1bb 100644 --- a/src/test/validation_block_tests.cpp +++ b/src/test/validation_block_tests.cpp @@ -283,15 +283,9 @@ BOOST_AUTO_TEST_CASE(mempool_locks_reorg) // Add the txs to the tx pool { LOCK(cs_main); - TxValidationState state; - std::list<CTransactionRef> plTxnReplaced; for (const auto& tx : txs) { - BOOST_REQUIRE(AcceptToMemoryPool( - *m_node.mempool, - state, - tx, - &plTxnReplaced, - /* bypass_limits */ false)); + const MempoolAcceptResult result = AcceptToMemoryPool(*m_node.mempool, tx, false /* bypass_limits */); + BOOST_REQUIRE(result.m_result_type == MempoolAcceptResult::ResultType::VALID); } } |