@@ -63,6 +63,7 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
6363 int64_t nCoinCacheUsage,
6464 bool block_tree_db_in_memory,
6565 bool coins_db_in_memory,
66+ bool dash_dbs_in_memory,
6667 std::function<bool ()> shutdown_requested,
6768 std::function<void()> coins_error_cb)
6869{
@@ -73,7 +74,7 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
7374 LOCK (cs_main);
7475
7576 evodb.reset ();
76- evodb = std::make_unique<CEvoDB>(util::DbWrapperParams{.path = data_dir, .memory = false , .wipe = fReset || fReindexChainState });
77+ evodb = std::make_unique<CEvoDB>(util::DbWrapperParams{.path = data_dir, .memory = dash_dbs_in_memory , .wipe = fReset || fReindexChainState });
7778
7879 mnhf_manager.reset ();
7980 mnhf_manager = std::make_unique<CMNHFManager>(*evodb);
@@ -89,8 +90,8 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
8990 pblocktree.reset (new CBlockTreeDB (nBlockTreeDBCache, block_tree_db_in_memory, fReset ));
9091
9192 DashChainstateSetup (chainman, govman, mn_metaman, mn_sync, sporkman, mn_activeman, chain_helper, cpoolman,
92- dmnman, evodb, mnhf_manager, llmq_ctx, mempool, data_dir, fReset , fReindexChainState ,
93- consensus_params);
93+ dmnman, evodb, mnhf_manager, llmq_ctx, mempool, data_dir, dash_dbs_in_memory ,
94+ /* llmq_dbs_wipe= */ fReset || fReindexChainState , consensus_params);
9495
9596 if (fReset ) {
9697 pblocktree->WriteReindexing (true );
@@ -230,8 +231,8 @@ void DashChainstateSetup(ChainstateManager& chainman,
230231 std::unique_ptr<LLMQContext>& llmq_ctx,
231232 CTxMemPool* mempool,
232233 const fs::path& data_dir,
233- bool fReset ,
234- bool fReindexChainState ,
234+ bool llmq_dbs_in_memory ,
235+ bool llmq_dbs_wipe ,
235236 const Consensus::Params& consensus_params)
236237{
237238 // Same logic as pblocktree
@@ -248,7 +249,7 @@ void DashChainstateSetup(ChainstateManager& chainman,
248249 llmq_ctx.reset ();
249250 llmq_ctx = std::make_unique<LLMQContext>(chainman, *dmnman, *evodb, mn_metaman, *mnhf_manager, sporkman,
250251 *mempool, mn_activeman.get (), mn_sync,
251- util::DbWrapperParams{.path = data_dir, .memory = false , .wipe = fReset || fReindexChainState });
252+ util::DbWrapperParams{.path = data_dir, .memory = llmq_dbs_in_memory , .wipe = llmq_dbs_wipe });
252253 mempool->ConnectManagers (dmnman.get (), llmq_ctx->isman .get ());
253254 // Enable CMNHFManager::{Process, Undo}Block
254255 mnhf_manager->ConnectManagers (&chainman, llmq_ctx->qman .get ());
0 commit comments