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:
1 parent
dbe45c34f8
commit
04c31c1295
11 files changed
+24
-14
No files matched your search
@@ -17,6 +17,7 @@ class CChainParams;
|
||||
*/
|
||||
struct ChainstateManagerOpts {
|
||||
const CChainParams& chainparams;
|
||||
const std::function<int64_t()> adjusted_time_callback{nullptr};
|
||||
};
|
||||
|
||||
#endif // BITCOIN_KERNEL_CHAINSTATEMANAGER_OPTS_H
|
||||
Reference in new issue
Block a user