mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
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:
@@ -144,6 +144,7 @@ BasicTestingSetup::BasicTestingSetup(const ChainType chainType, const std::vecto
|
|||||||
|
|
||||||
BasicTestingSetup::~BasicTestingSetup()
|
BasicTestingSetup::~BasicTestingSetup()
|
||||||
{
|
{
|
||||||
|
m_node.kernel.reset();
|
||||||
SetMockTime(0s); // Reset mocktime for following tests
|
SetMockTime(0s); // Reset mocktime for following tests
|
||||||
LogInstance().DisconnectTestLogger();
|
LogInstance().DisconnectTestLogger();
|
||||||
fs::remove_all(m_path_root);
|
fs::remove_all(m_path_root);
|
||||||
@@ -202,8 +203,9 @@ ChainTestingSetup::~ChainTestingSetup()
|
|||||||
m_node.netgroupman.reset();
|
m_node.netgroupman.reset();
|
||||||
m_node.args = nullptr;
|
m_node.args = nullptr;
|
||||||
m_node.mempool.reset();
|
m_node.mempool.reset();
|
||||||
m_node.scheduler.reset();
|
m_node.fee_estimator.reset();
|
||||||
m_node.chainman.reset();
|
m_node.chainman.reset();
|
||||||
|
m_node.scheduler.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChainTestingSetup::LoadVerifyActivateChainstate()
|
void ChainTestingSetup::LoadVerifyActivateChainstate()
|
||||||
|
|||||||
Reference in New Issue
Block a user