@@ -118,24 +118,6 @@ void DashChainstateSetupClose(NodeContext& node)
118118 Assert (node.mempool .get ()));
119119}
120120
121- void DashPostChainstateSetup (NodeContext& node)
122- {
123- node.cj_ctx = std::make_unique<CJContext>(*node.chainman , *node.connman , *node.dmnman , *node.mn_metaman , *node.mempool ,
124- /* mn_activeman=*/ nullptr , *node.mn_sync , *node.llmq_ctx ->isman , node.peerman ,
125- /* relay_txes=*/ true );
126- #ifdef ENABLE_WALLET
127- node.coinjoin_loader = interfaces::MakeCoinJoinLoader (node);
128- #endif // ENABLE_WALLET
129- }
130-
131- void DashPostChainstateSetupClose (NodeContext& node)
132- {
133- #ifdef ENABLE_WALLET
134- node.coinjoin_loader .reset ();
135- #endif // ENABLE_WALLET
136- node.cj_ctx .reset ();
137- }
138-
139121BasicTestingSetup::BasicTestingSetup (const std::string& chainName, const std::vector<const char *>& extra_args)
140122 : m_path_root{fs::temp_directory_path () / " test_common_" PACKAGE_NAME / g_insecure_rand_ctx_temp_path.rand256 ().ToString ()},
141123 m_args{}
@@ -330,7 +312,12 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
330312 m_node.connman ->Init (options);
331313 }
332314
333- DashPostChainstateSetup (m_node);
315+ m_node.cj_ctx = std::make_unique<CJContext>(*m_node.chainman , *m_node.connman , *m_node.dmnman , *m_node.mn_metaman , *m_node.mempool ,
316+ /* mn_activeman=*/ nullptr , *m_node.mn_sync , *m_node.llmq_ctx ->isman , m_node.peerman ,
317+ /* relay_txes=*/ true );
318+ #ifdef ENABLE_WALLET
319+ m_node.coinjoin_loader = interfaces::MakeCoinJoinLoader (m_node);
320+ #endif // ENABLE_WALLET
334321
335322 BlockValidationState state;
336323 if (!m_node.chainman ->ActiveChainstate ().ActivateBestChain (state)) {
@@ -340,7 +327,10 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
340327
341328TestingSetup::~TestingSetup ()
342329{
343- DashPostChainstateSetupClose (m_node);
330+ #ifdef ENABLE_WALLET
331+ m_node.coinjoin_loader .reset ();
332+ #endif // ENABLE_WALLET
333+ m_node.cj_ctx .reset ();
344334
345335 // Interrupt() and PrepareShutdown() routines
346336 if (m_node.llmq_ctx ) {
0 commit comments