tests: Reset node context members on ~BasicTestingSetup

The destruction/resetting of node context members in the tests should
roughly follow the behaviour of the Shutdown function in `init.cpp`.
This commit is contained in:
TheCharlatan 2023-10-24 08:38:06 +02:00
parent 9759af17ff
commit c1144f0076
No known key found for this signature in database
GPG key ID: 9B79B45691DB4173

View file

@ -144,6 +144,7 @@ BasicTestingSetup::BasicTestingSetup(const ChainType chainType, const std::vecto
BasicTestingSetup::~BasicTestingSetup()
{
m_node.kernel.reset();
SetMockTime(0s); // Reset mocktime for following tests
LogInstance().DisconnectTestLogger();
fs::remove_all(m_path_root);
@ -202,8 +203,9 @@ ChainTestingSetup::~ChainTestingSetup()
m_node.netgroupman.reset();
m_node.args = nullptr;
m_node.mempool.reset();
m_node.scheduler.reset();
m_node.fee_estimator.reset();
m_node.chainman.reset();
m_node.scheduler.reset();
}
void ChainTestingSetup::LoadVerifyActivateChainstate()