mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge c07935bcf5 into merged_master (Bitcoin PR #28960)
This commit is contained in:
commit
81a17ea31a
40 changed files with 368 additions and 291 deletions
|
|
@ -194,7 +194,7 @@ ChainTestingSetup::ChainTestingSetup(const ChainType chainType, const std::vecto
|
|||
// from blocking due to queue overrun.
|
||||
m_node.scheduler = std::make_unique<CScheduler>();
|
||||
m_node.scheduler->m_service_thread = std::thread(util::TraceThread, "scheduler", [&] { m_node.scheduler->serviceQueue(); });
|
||||
GetMainSignals().RegisterBackgroundSignalScheduler(*m_node.scheduler);
|
||||
m_node.validation_signals = std::make_unique<ValidationSignals>(std::make_unique<SerialTaskRunner>(*m_node.scheduler));
|
||||
|
||||
m_node.fee_estimator = std::make_unique<CBlockPolicyEstimator>(FeeestPath(*m_node.args), DEFAULT_ACCEPT_STALE_FEE_ESTIMATES);
|
||||
m_node.mempool = std::make_unique<CTxMemPool>(MemPoolOptionsForTest(m_node));
|
||||
|
|
@ -210,6 +210,7 @@ ChainTestingSetup::ChainTestingSetup(const ChainType chainType, const std::vecto
|
|||
.minimum_chain_work = std::nullopt,
|
||||
.assumed_valid_block = std::nullopt,
|
||||
.notifications = *m_node.notifications,
|
||||
.signals = m_node.validation_signals.get(),
|
||||
.worker_threads_num = 2,
|
||||
};
|
||||
const BlockManager::Options blockman_opts{
|
||||
|
|
@ -227,8 +228,7 @@ ChainTestingSetup::ChainTestingSetup(const ChainType chainType, const std::vecto
|
|||
ChainTestingSetup::~ChainTestingSetup()
|
||||
{
|
||||
if (m_node.scheduler) m_node.scheduler->stop();
|
||||
GetMainSignals().FlushBackgroundCallbacks();
|
||||
GetMainSignals().UnregisterBackgroundSignalScheduler();
|
||||
m_node.validation_signals->FlushBackgroundCallbacks();
|
||||
m_node.connman.reset();
|
||||
m_node.banman.reset();
|
||||
m_node.addrman.reset();
|
||||
|
|
@ -237,6 +237,7 @@ ChainTestingSetup::~ChainTestingSetup()
|
|||
m_node.mempool.reset();
|
||||
m_node.fee_estimator.reset();
|
||||
m_node.chainman.reset();
|
||||
m_node.validation_signals.reset();
|
||||
m_node.scheduler.reset();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue