mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
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:
@@ -1052,7 +1052,9 @@ bool AppInitParameterInteraction(const ArgsManager& args)
|
||||
if (!g_wallet_init_interface.ParameterInteraction()) return false;
|
||||
|
||||
// Option to startup with mocktime set (used for regression testing):
|
||||
SetMockTime(args.GetIntArg("-mocktime", 0)); // SetMockTime(0) is a no-op
|
||||
if (const auto mocktime{args.GetIntArg("-mocktime")}) {
|
||||
SetMockTime(std::chrono::seconds{*mocktime});
|
||||
}
|
||||
|
||||
if (args.GetBoolArg("-peerbloomfilters", DEFAULT_PEERBLOOMFILTERS))
|
||||
g_local_services = ServiceFlags(g_local_services | NODE_BLOOM);
|
||||
|
||||
Reference in New Issue
Block a user