mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03: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:
parent
9759af17ff
commit
c1144f0076
1 changed files with 3 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue