mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Move pblocktree global to BlockManager
This commit is contained in:
@@ -141,12 +141,11 @@ ChainTestingSetup::ChainTestingSetup(const std::string& chainName, const std::ve
|
||||
m_node.scheduler->m_service_thread = std::thread(util::TraceThread, "scheduler", [&] { m_node.scheduler->serviceQueue(); });
|
||||
GetMainSignals().RegisterBackgroundSignalScheduler(*m_node.scheduler);
|
||||
|
||||
pblocktree.reset(new CBlockTreeDB(1 << 20, true));
|
||||
|
||||
m_node.fee_estimator = std::make_unique<CBlockPolicyEstimator>();
|
||||
m_node.mempool = std::make_unique<CTxMemPool>(m_node.fee_estimator.get(), 1);
|
||||
|
||||
m_node.chainman = std::make_unique<ChainstateManager>();
|
||||
m_node.chainman->m_blockman.m_block_tree_db = std::make_unique<CBlockTreeDB>(1 << 20, true);
|
||||
|
||||
// Start script-checking threads. Set g_parallel_script_checks to true so they are used.
|
||||
constexpr int script_check_threads = 2;
|
||||
@@ -169,7 +168,6 @@ ChainTestingSetup::~ChainTestingSetup()
|
||||
m_node.scheduler.reset();
|
||||
m_node.chainman->Reset();
|
||||
m_node.chainman.reset();
|
||||
pblocktree.reset();
|
||||
}
|
||||
|
||||
TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const char*>& extra_args)
|
||||
|
||||
Reference in New Issue
Block a user