aboutsummaryrefslogtreecommitdiff
path: root/src/test/util/setup_common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/util/setup_common.cpp')
-rw-r--r--src/test/util/setup_common.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp
index 29ec144c49..32d50e49b9 100644
--- a/src/test/util/setup_common.cpp
+++ b/src/test/util/setup_common.cpp
@@ -114,7 +114,8 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha
GetMainSignals().RegisterBackgroundSignalScheduler(*g_rpc_node->scheduler);
pblocktree.reset(new CBlockTreeDB(1 << 20, true));
- g_chainstate = MakeUnique<CChainState>();
+
+ g_chainman.InitializeChainstate();
::ChainstateActive().InitCoinsDB(
/* cache_size_bytes */ 1 << 23, /* in_memory */ true, /* should_wipe */ false);
assert(!::ChainstateActive().CanFlushToDisk());
@@ -161,7 +162,7 @@ TestingSetup::~TestingSetup()
m_node.mempool = nullptr;
m_node.scheduler.reset();
UnloadBlockIndex();
- g_chainstate.reset();
+ g_chainman.Reset();
pblocktree.reset();
}