aboutsummaryrefslogtreecommitdiff
path: root/src/test/util
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@gmail.com>2019-12-12 10:48:28 -0500
committerJames O'Beirne <james.obeirne@pm.me>2020-03-17 14:03:40 -0400
commit4ae29f5f0c5117032debb722d7049664fdceeae8 (patch)
tree48432a68a7fc218f88aa8dc3eaa6e7abef4477b6 /src/test/util
parent5b690f0aae21e7d46cbefe3f5be645842ac4ae3b (diff)
use ChainstateManager to initialize chainstate
This allows us to easily initialize multiple chainstates on startup in future commits. It retires the g_chainstate global in lieu of g_chainman.
Diffstat (limited to 'src/test/util')
-rw-r--r--src/test/util/setup_common.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp
index e19a96eafc..dacdce0acb 100644
--- a/src/test/util/setup_common.cpp
+++ b/src/test/util/setup_common.cpp
@@ -111,7 +111,7 @@ 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());
@@ -153,7 +153,7 @@ TestingSetup::~TestingSetup()
m_node.mempool = nullptr;
m_node.scheduler.reset();
UnloadBlockIndex();
- g_chainstate.reset();
+ g_chainman.Reset();
pblocktree.reset();
}