aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2023-06-15 23:09:37 +0200
committerTheCharlatan <seb.kung@gmail.com>2023-06-28 09:52:32 +0200
commit7320db96f8d2aeff0bc5dc67d8b7b37f5f808990 (patch)
tree6a15f7fac466f6c0d4dc75ff05a9b52205c1102f /src/init.cpp
parent3fa9094b92c5d37f486b0f8265062d3456796a50 (diff)
kernel: Add flushError method to notifications
This is done in addition with the following commit. Both have the goal of getting rid of direct calls to AbortNode from kernel code. This extra flushError method is added to notify specifically about errors that arrise when flushing (syncing) block data to disk. Unlike other instances, the current calls to AbortNode in the blockstorage flush functions do not report an error to their callers. This commit is part of the libbitcoinkernel project and further removes the shutdown's and, more generally, the kernel library's dependency on interface_ui with a kernel notification method. By removing interface_ui from the kernel library, its dependency on boost is reduced to just boost::multi_index. At the same time it also takes a step towards de-globalising the interrupt infrastructure.
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index ac81ebab82..a1b210f201 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -999,6 +999,7 @@ bool AppInitParameterInteraction(const ArgsManager& args)
BlockManager::Options blockman_opts_dummy{
.chainparams = chainman_opts_dummy.chainparams,
.blocks_dir = args.GetBlocksDirPath(),
+ .notifications = chainman_opts_dummy.notifications,
};
auto blockman_result{ApplyArgsManOptions(args, blockman_opts_dummy)};
if (!blockman_result) {
@@ -1423,6 +1424,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
BlockManager::Options blockman_opts{
.chainparams = chainman_opts.chainparams,
.blocks_dir = args.GetBlocksDirPath(),
+ .notifications = chainman_opts.notifications,
};
Assert(ApplyArgsManOptions(args, blockman_opts)); // no error can happen, already checked in AppInitParameterInteraction