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:
Carl Dong
2022-03-01 16:14:12 -05:00
parent dbe45c34f8
commit 04c31c1295
11 changed files with 24 additions and 14 deletions

View File

@@ -10,6 +10,7 @@
#include <node/miner.h>
#include <policy/policy.h>
#include <script/standard.h>
#include <timedata.h>
#include <txmempool.h>
#include <uint256.h>
#include <util/strencodings.h>