mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
node: Add chainman alias for g_chainman
This commit is contained in:
parent
cfe22a5f9e
commit
fa7b626d7a
4 changed files with 32 additions and 19 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue