From 05441c2dc5f60e2025476d8ec94c9025032d118c Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Wed, 22 Sep 2021 15:36:10 -0400 Subject: node/chainstate: Decouple from GetTime ...instead pass in a std::function Note that the static_cast is needed (apparently) for the compiler to know which overloaded GetTime to choose. --- src/init.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index 9c8963d10d..5df4d794f3 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1487,7 +1487,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) fReindexChainState, chainparams, check_blocks, - args.GetIntArg("-checklevel", DEFAULT_CHECKLEVEL)); + args.GetIntArg("-checklevel", DEFAULT_CHECKLEVEL), + static_cast(GetTime)); } catch (const std::exception& e) { LogPrintf("%s\n", e.what()); rv2 = ChainstateLoadVerifyError::ERROR_GENERIC_FAILURE; -- cgit v1.2.3