Remove mempool global

This commit is contained in:
MarcoFalke
2020-07-19 20:30:46 +02:00
parent fa0359c5b3
commit fafb381af8
8 changed files with 11 additions and 12 deletions

View File

@@ -141,7 +141,7 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
pblocktree.reset(new CBlockTreeDB(1 << 20, true));
m_node.mempool = &::mempool;
m_node.mempool = MakeUnique<CTxMemPool>(&::feeEstimator);
m_node.mempool->setSanityCheck(1.0);
m_node.chainman = &::g_chainman;
@@ -187,8 +187,8 @@ TestingSetup::~TestingSetup()
m_node.connman.reset();
m_node.banman.reset();
m_node.args = nullptr;
UnloadBlockIndex(m_node.mempool);
m_node.mempool = nullptr;
UnloadBlockIndex(m_node.mempool.get());
m_node.mempool.reset();
m_node.scheduler.reset();
m_node.chainman->Reset();
m_node.chainman = nullptr;