@@ -220,17 +220,23 @@ ChainTestingSetup::~ChainTestingSetup()
220220 m_node.chainman .reset ();
221221}
222222
223- TestingSetup::TestingSetup (const std::string& chainName, const std::vector<const char *>& extra_args)
224- : ChainTestingSetup(chainName, extra_args)
223+ TestingSetup::TestingSetup (
224+ const std::string& chainName,
225+ const std::vector<const char *>& extra_args,
226+ const bool coins_db_in_memory,
227+ const bool block_tree_db_in_memory)
228+ : ChainTestingSetup(chainName, extra_args),
229+ m_coins_db_in_memory(coins_db_in_memory),
230+ m_block_tree_db_in_memory(block_tree_db_in_memory)
225231{
226232 // Ideally we'd move all the RPC tests to the functional testing framework
227233 // instead of unit tests, but for now we need these here.
228234 RegisterAllCoreRPCCommands (tableRPC);
229235
230236 node::ChainstateLoadOptions options;
231237 options.mempool = Assert (m_node.mempool .get ());
232- options.block_tree_db_in_memory = true ;
233- options.coins_db_in_memory = true ;
238+ options.block_tree_db_in_memory = m_block_tree_db_in_memory ;
239+ options.coins_db_in_memory = m_coins_db_in_memory ;
234240 options.reindex = node::fReindex ;
235241 options.reindex_chainstate = m_args.GetBoolArg (" -reindex-chainstate" , false );
236242 options.prune = node::fPruneMode ;
@@ -263,8 +269,12 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
263269 }
264270}
265271
266- TestChain100Setup::TestChain100Setup (const std::string& chain_name, const std::vector<const char *>& extra_args)
267- : TestingSetup{chain_name, extra_args}
272+ TestChain100Setup::TestChain100Setup (
273+ const std::string& chain_name,
274+ const std::vector<const char *>& extra_args,
275+ const bool coins_db_in_memory,
276+ const bool block_tree_db_in_memory)
277+ : TestingSetup{CBaseChainParams::REGTEST, extra_args, coins_db_in_memory, block_tree_db_in_memory}
268278{
269279 SetMockTime (1598887952 );
270280 constexpr std::array<unsigned char , 32 > vchKey = {
0 commit comments