HomePhabricator

node/chainstate: Decouple from GetTime

Description

node/chainstate: Decouple from GetTime

Summary:

...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.

Partial backport of core#23280:
https://github.com/bitcoin/bitcoin/pull/23280/commits/05441c2dc5f60e2025476d8ec94c9025032d118c

Depends on D12576.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, sdulfari

Reviewed By: #bitcoin_abc, sdulfari

Differential Revision: https://reviews.bitcoinabc.org/D12577

Details

Provenance
Carl Dong <contact@carldong.me>Authored on Sep 22 2021, 19:36
FabienCommitted on Nov 22 2022, 19:38
FabienPushed on Nov 22 2022, 19:38
Reviewer
Restricted Project
Differential Revision
D12577: node/chainstate: Decouple from GetTime
Parents
rABCef89e93b7c35: init: Delay RPC block notif until warmup finished
Branches
Unknown
Tags
Unknown