HomePhabricator

kernel: Add notification interface

Description

kernel: Add notification interface

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

This is a backport of core#27636
https://github.com/bitcoin/bitcoin/pull/27636/commits/447761c8228d58f948aae7e73ed079c028cacb97

Test Plan:
With bitcoin-chainstate:
ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
TheCharlatan <seb.kung@gmail.com>Authored on May 10 2023, 20:29
PiRKCommitted on May 23 2024, 19:11
PiRKPushed on May 23 2024, 19:11
Reviewer
Restricted Project
Differential Revision
D16204: kernel: Add notification interface
Parents
rABCb44d125a8154: [cmake] define STRERROR_R_CHAR_P
Branches
Unknown
Tags
Unknown