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/txvalidationcache_tests.cpp | |
parent | 9db10a55061e09021ff8ea1d6637d99f7959035f (diff) | |
download | bitcoin-f82baf0762f60c2ca5ffc339b095f9271d7c2f33.tar.xz |
[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/txvalidationcache_tests.cpp')
-rw-r--r-- | src/test/txvalidationcache_tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/txvalidationcache_tests.cpp b/src/test/txvalidationcache_tests.cpp index bed2ba3608..af0090cc10 100644 --- a/src/test/txvalidationcache_tests.cpp +++ b/src/test/txvalidationcache_tests.cpp @@ -28,9 +28,9 @@ BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, TestChain100Setup) const auto ToMemPool = [this](const CMutableTransaction& tx) { LOCK(cs_main); - TxValidationState state; - return AcceptToMemoryPool(*m_node.mempool, state, MakeTransactionRef(tx), - nullptr /* plTxnReplaced */, true /* bypass_limits */); + const MempoolAcceptResult result = AcceptToMemoryPool(*m_node.mempool, MakeTransactionRef(tx), + true /* bypass_limits */); + return result.m_result_type == MempoolAcceptResult::ResultType::VALID; }; // Create a double-spend of mature coinbase txn: |