test: Avoid resetting mocktime in testing setup

This allows to set the mocktime before the testing setup.

Also, in some fuzz tests the mocktime was reset to 0 before this change,
so set it.
This commit is contained in:
MarcoFalke
2025-05-07 09:42:32 +02:00
parent fa6b45fa8e
commit fa26bfde98
7 changed files with 9 additions and 3 deletions

View File

@@ -44,6 +44,7 @@ void initialize_process_message()
/*chain_type=*/ChainType::REGTEST,
{.extra_args = {"-txreconciliation"}});
g_setup = testing_setup.get();
SetMockTime(WITH_LOCK(g_setup->m_node.chainman->GetMutex(), return g_setup->m_node.chainman->ActiveTip()->Time()));
for (int i = 0; i < 2 * COINBASE_MATURITY; i++) {
MineBlock(g_setup->m_node, {});
}