diff options
Diffstat (limited to 'src/test/validation_chainstate_tests.cpp')
-rw-r--r-- | src/test/validation_chainstate_tests.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/test/validation_chainstate_tests.cpp b/src/test/validation_chainstate_tests.cpp index e7c7584f1c..ee60f9aa4d 100644 --- a/src/test/validation_chainstate_tests.cpp +++ b/src/test/validation_chainstate_tests.cpp @@ -3,29 +3,27 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. // #include <chainparams.h> -#include <random.h> -#include <uint256.h> #include <consensus/validation.h> -#include <sync.h> +#include <random.h> #include <rpc/blockchain.h> +#include <sync.h> #include <test/util/chainstate.h> #include <test/util/setup_common.h> +#include <uint256.h> #include <validation.h> #include <vector> #include <boost/test/unit_test.hpp> -BOOST_FIXTURE_TEST_SUITE(validation_chainstate_tests, TestingSetup) +BOOST_FIXTURE_TEST_SUITE(validation_chainstate_tests, ChainTestingSetup) //! Test resizing coins-related CChainState caches during runtime. //! BOOST_AUTO_TEST_CASE(validation_chainstate_resize_caches) { - const CChainParams& chainparams = Params(); - ChainstateManager manager(chainparams); - WITH_LOCK(::cs_main, manager.m_blockman.m_block_tree_db = std::make_unique<CBlockTreeDB>(1 << 20, true)); - CTxMemPool mempool; + ChainstateManager& manager = *Assert(m_node.chainman); + CTxMemPool& mempool = *Assert(m_node.mempool); //! Create and add a Coin with DynamicMemoryUsage of 80 bytes to the given view. auto add_coin = [](CCoinsViewCache& coins_view) -> COutPoint { |