mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Add ChainstateManager::m_adjusted_time_callback
This decouples validation.cpp from netaddress.cpp (transitively, timedata.cpp, and asmap.cpp). This is important for libbitcoinkernel as: - There is no reason for the consensus engine to be coupled with netaddress, timedata, and asmap - Users of libbitcoinkernel can now easily supply their own std::function that provides the adjusted time. See the src/Makefile.am changes for some satisfying removals.
This commit is contained in:
parent
dbe45c34f8
commit
04c31c1295
11 changed files with 24 additions and 14 deletions
|
|
@ -1423,6 +1423,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
|
||||
const ChainstateManager::Options chainman_opts{
|
||||
chainparams,
|
||||
GetAdjustedTime,
|
||||
};
|
||||
node.chainman = std::make_unique<ChainstateManager>(chainman_opts);
|
||||
ChainstateManager& chainman = *node.chainman;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue