diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-04-18 08:05:52 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-05-21 09:55:51 -0400 |
commit | fa7b626d7a150e5cbd4d163d2dab6f8a55fc2cc4 (patch) | |
tree | cdd1af4dac61f7738037603d88c19f25767e118a /src/test/util | |
parent | cfe22a5f9e1d9e2d3dc8ce177e6c8eb04bc96615 (diff) | |
download | bitcoin-fa7b626d7a150e5cbd4d163d2dab6f8a55fc2cc4.tar.xz |
node: Add chainman alias for g_chainman
Diffstat (limited to 'src/test/util')
-rw-r--r-- | src/test/util/setup_common.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp index 86dac55b2b..b885b9218b 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -134,7 +134,8 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const pblocktree.reset(new CBlockTreeDB(1 << 20, true)); - g_chainman.InitializeChainstate(); + m_node.chainman = &::g_chainman; + m_node.chainman->InitializeChainstate(); ::ChainstateActive().InitCoinsDB( /* cache_size_bytes */ 1 << 23, /* in_memory */ true, /* should_wipe */ false); assert(!::ChainstateActive().CanFlushToDisk()); @@ -181,7 +182,8 @@ TestingSetup::~TestingSetup() m_node.mempool = nullptr; m_node.scheduler.reset(); UnloadBlockIndex(); - g_chainman.Reset(); + m_node.chainman->Reset(); + m_node.chainman = nullptr; pblocktree.reset(); } |