MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / ~BasicTestingSetup

Method ~BasicTestingSetup

src/test/util/setup_common.cpp:251–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251BasicTestingSetup::~BasicTestingSetup()
252{
253 m_node.ecc_context.reset();
254 m_node.kernel.reset();
255 if (!EnableFuzzDeterminism()) {
256 SetMockTime(0s); // Reset mocktime for following tests
257 }
258 LogInstance().DisconnectTestLogger();
259 if (m_has_custom_datadir) {
260 // Only remove the lock file, preserve the data directory.
261 UnlockDirectory(m_path_lock, ".lock");
262 fs::remove(m_path_lock / ".lock");
263 } else {
264 fs::remove_all(m_path_root);
265 }
266 // Clear all arguments except for -datadir, which GUI tests currently rely
267 // on to be set even after the testing setup is destroyed.
268 gArgs.ClearArgs();
269 gArgs.ForceSetArg("-datadir", fs::PathToString(m_path_root));
270}
271
272ChainTestingSetup::ChainTestingSetup(const ChainType chainType, TestOpts opts)
273 : BasicTestingSetup(chainType, opts)

Callers

nothing calls this directly

Calls 8

EnableFuzzDeterminismFunction · 0.85
SetMockTimeFunction · 0.85
UnlockDirectoryFunction · 0.85
PathToStringFunction · 0.85
DisconnectTestLoggerMethod · 0.80
ClearArgsMethod · 0.80
ForceSetArgMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected