mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
validation: Farewell, global Chainstate!
This commit is contained in:
@@ -145,7 +145,7 @@ ChainTestingSetup::ChainTestingSetup(const std::string& chainName, const std::ve
|
||||
m_node.fee_estimator = std::make_unique<CBlockPolicyEstimator>();
|
||||
m_node.mempool = std::make_unique<CTxMemPool>(m_node.fee_estimator.get(), 1);
|
||||
|
||||
m_node.chainman = &::g_chainman;
|
||||
m_node.chainman = std::make_unique<ChainstateManager>();
|
||||
|
||||
// Start script-checking threads. Set g_parallel_script_checks to true so they are used.
|
||||
constexpr int script_check_threads = 2;
|
||||
@@ -167,7 +167,7 @@ ChainTestingSetup::~ChainTestingSetup()
|
||||
m_node.mempool.reset();
|
||||
m_node.scheduler.reset();
|
||||
m_node.chainman->Reset();
|
||||
m_node.chainman = nullptr;
|
||||
m_node.chainman.reset();
|
||||
pblocktree.reset();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user