Kernel notification handler that tracks chain state for code above the validation layer.
Synopsis
Declared in <node/kernel_notifications.h>
class KernelNotifications
: public kernel::Notifications
Base Classes
Name |
Description |
A base class defining functions for notifying about certain kernel events. |
Member Functions
Name |
Description |
|
Construct the notification handler. |
The block for which the last blockTip notification was received. It's first set when the tip is connected during node initialization. Might be unset during an early shutdown. |
|
|
Handle a new chain tip being connected. |
|
Handle a fatal, unrecoverable error, requesting shutdown unless disabled. |
|
Handle a non‐fatal error while flushing state to disk. |
|
Handle the best header advancing during headers synchronization. |
|
Report progress of a long‐running operation to the UI. |
Record whether the chainstate has finished loading. |
|
|
|
|
Data Members
Name |
Description |
Useful for tests, can be set to false to avoid shutdown on fatal error. |
|
Kernel state guarded by m_tip_block_mutex. |
|
Block height after which blockTip notification will return Interrupted{}, if >0. |
|
Signaled when the tip‐block state changes. |
|
Guards the tip‐block state and its condition variable. |
Non-Member Functions
Name |
Description |
Interrupt a blocking wait call. |
|
Report an unrecoverable error, flag the validation state as failed, and notify the node to shut down. |
Created with MrDocs