|
45 | 45 | #include <node/chainstatemanager_args.h> |
46 | 46 | #include <node/context.h> |
47 | 47 | #include <node/interface_ui.h> |
| 48 | +#include <node/kernel_notifications.h> |
48 | 49 | #include <node/mempool_args.h> |
49 | 50 | #include <node/mempool_persist_args.h> |
50 | 51 | #include <node/miner.h> |
@@ -124,6 +125,7 @@ using node::DEFAULT_PERSIST_MEMPOOL; |
124 | 125 | using node::DEFAULT_PRINTPRIORITY; |
125 | 126 | using node::fReindex; |
126 | 127 | using node::g_indexes_ready_to_sync; |
| 128 | +using node::KernelNotifications; |
127 | 129 | using node::LoadChainstate; |
128 | 130 | using node::MempoolPath; |
129 | 131 | using node::NodeContext; |
@@ -1019,9 +1021,11 @@ bool AppInitParameterInteraction(const ArgsManager& args, bool use_syscall_sandb |
1019 | 1021 |
|
1020 | 1022 | // Also report errors from parsing before daemonization |
1021 | 1023 | { |
| 1024 | + KernelNotifications notifications{}; |
1022 | 1025 | ChainstateManager::Options chainman_opts_dummy{ |
1023 | 1026 | .chainparams = chainparams, |
1024 | 1027 | .datadir = args.GetDataDirNet(), |
| 1028 | + .notifications = notifications, |
1025 | 1029 | }; |
1026 | 1030 | if (const auto error{ApplyArgsManOptions(args, chainman_opts_dummy)}) { |
1027 | 1031 | return InitError(*error); |
@@ -1427,12 +1431,14 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) |
1427 | 1431 |
|
1428 | 1432 | // ********************************************************* Step 7: load block chain |
1429 | 1433 |
|
| 1434 | + node.notifications = std::make_unique<KernelNotifications>(); |
1430 | 1435 | fReindex = args.GetBoolArg("-reindex", false); |
1431 | 1436 | bool fReindexChainState = args.GetBoolArg("-reindex-chainstate", false); |
1432 | 1437 | ChainstateManager::Options chainman_opts{ |
1433 | 1438 | .chainparams = chainparams, |
1434 | 1439 | .datadir = args.GetDataDirNet(), |
1435 | 1440 | .adjusted_time_callback = GetAdjustedTime, |
| 1441 | + .notifications = *node.notifications, |
1436 | 1442 | }; |
1437 | 1443 | Assert(!ApplyArgsManOptions(args, chainman_opts)); // no error can happen, already checked in AppInitParameterInteraction |
1438 | 1444 |
|
|
0 commit comments