aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2023-05-10 22:29:17 +0200
committerTheCharlatan <seb.kung@gmail.com>2023-05-20 12:03:22 +0200
commit447761c8228d58f948aae7e73ed079c028cacb97 (patch)
tree138ae285148636dd18870df62338a6acacaa400c /src/validation.h
parent0f8c95dccd120ad5fd371f81025137b855796f13 (diff)
kernel: Add notification interface
This commit is part of the libbitcoinkernel project and seeks to remove the ChainstateManager's and, more generally, the kernel library's dependency on interface_ui with options methods in this and the following few commits. By removing interface_ui from the kernel library, its dependency on boost is reduced to just boost::multi_index. Define a new kernel notification class with virtual methods for notifying about internal kernel events. Create a new file in the node library for defining a function creating the default set of notification methods such that these do not need to be re-defined all over the codebase. As a first step, add a `blockTip` method, wrapping `uiInterface.NotifyBlockTip`.
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/validation.h b/src/validation.h
index fd0e2115f7..352056f063 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -955,6 +955,7 @@ public:
bool ShouldCheckBlockIndex() const { return *Assert(m_options.check_block_index); }
const arith_uint256& MinimumChainWork() const { return *Assert(m_options.minimum_chain_work); }
const uint256& AssumedValidBlock() const { return *Assert(m_options.assumed_valid_block); }
+ kernel::Notifications& GetNotifications() const { return m_options.notifications; };
/**
* Alias for ::cs_main.