mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
node/chainstate: Decouple from GetTime
...instead pass in a std::function<int64_t()> Note that the static_cast is needed (apparently) for the compiler to know which overloaded GetTime to choose.
This commit is contained in:
@@ -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<int64_t(*)()>(GetTime));
|
||||
} catch (const std::exception& e) {
|
||||
LogPrintf("%s\n", e.what());
|
||||
rv2 = ChainstateLoadVerifyError::ERROR_GENERIC_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user