diff options
author | glozow <gloriajzhao@gmail.com> | 2021-09-29 19:36:01 +0100 |
---|---|---|
committer | glozow <gloriajzhao@gmail.com> | 2021-10-04 15:00:28 +0100 |
commit | 082c5bf099c64e3d27abe9b68a71ce500b693e7e (patch) | |
tree | de3cef3823de0046834bbf621ba3a32e2b09042d /src/test/fuzz/tx_pool.cpp | |
parent | ed6115f1eae0eb4669601106a9aaff078a2f3a74 (diff) | |
download | bitcoin-082c5bf099c64e3d27abe9b68a71ce500b693e7e.tar.xz |
[refactor] pass coinsview and height to check()
Removes check's dependency on validation.h
Diffstat (limited to 'src/test/fuzz/tx_pool.cpp')
-rw-r--r-- | src/test/fuzz/tx_pool.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/fuzz/tx_pool.cpp b/src/test/fuzz/tx_pool.cpp index 6201cc813c..17b5ef88b9 100644 --- a/src/test/fuzz/tx_pool.cpp +++ b/src/test/fuzz/tx_pool.cpp @@ -81,7 +81,7 @@ void SetMempoolConstraints(ArgsManager& args, FuzzedDataProvider& fuzzed_data_pr void Finish(FuzzedDataProvider& fuzzed_data_provider, MockedTxPool& tx_pool, CChainState& chainstate) { - WITH_LOCK(::cs_main, tx_pool.check(chainstate)); + WITH_LOCK(::cs_main, tx_pool.check(chainstate.CoinsTip(), chainstate.m_chain.Height() + 1)); { BlockAssembler::Options options; options.nBlockMaxWeight = fuzzed_data_provider.ConsumeIntegralInRange(0U, MAX_BLOCK_WEIGHT); @@ -97,7 +97,7 @@ void Finish(FuzzedDataProvider& fuzzed_data_provider, MockedTxPool& tx_pool, CCh std::vector<uint256> all_txids; tx_pool.queryHashes(all_txids); assert(all_txids.size() < info_all.size()); - WITH_LOCK(::cs_main, tx_pool.check(chainstate)); + WITH_LOCK(::cs_main, tx_pool.check(chainstate.CoinsTip(), chainstate.m_chain.Height() + 1)); } SyncWithValidationInterfaceQueue(); } |