[#kernel-Notifications]
= xref:kernel.adoc[kernel]::Notifications
:relfileprefix: ../
:mrdocs:

A base class defining functions for notifying about certain kernel events&period;

== Synopsis

Declared in `&lt;kernel&sol;notifications&lowbar;interface&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Notifications;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:kernel/Notifications/2destructor.adoc[`&#126;Notifications`] [.small]#[destructor]# [.small]#[virtual]#
| Destroys the notifications interface&period;
| xref:kernel/Notifications/blockTip.adoc[`blockTip`]  [.small]#[virtual]#
| Notifies that the active chain tip has advanced to a new block&period;
| xref:kernel/Notifications/fatalError.adoc[`fatalError`]  [.small]#[virtual]#
| The fatal error notification is sent to notify the user when an error occurs in kernel code that can&apos;t be recovered from&period; After this notification is sent, whatever function triggered the error should also return an error code or raise an exception&period; Applications can choose to handle the fatal error notification by logging the error, or notifying the user, or triggering an early shutdown as a precaution against causing more errors&period;
| xref:kernel/Notifications/flushError.adoc[`flushError`]  [.small]#[virtual]#
| The flush error notification is sent to notify the user that an error occurred while flushing block data to disk&period; Kernel code may ignore flush errors that don&apos;t affect the immediate operation it is trying to perform&period; Applications can choose to handle the flush error notification by logging the error, or notifying the user, or triggering an early shutdown as a precaution against causing more errors&period;
| xref:kernel/Notifications/headerTip.adoc[`headerTip`]  [.small]#[virtual]#
| Notifies that a new block header has been received during header sync&period;
| xref:kernel/Notifications/progress.adoc[`progress`]  [.small]#[virtual]#
| Notifies about the progress of a long&hyphen;running operation&period;
| xref:kernel/Notifications/warningSet.adoc[`warningSet`]  [.small]#[virtual]#
| Notifies that a node warning has been raised&period;
| xref:kernel/Notifications/warningUnset.adoc[`warningUnset`]  [.small]#[virtual]#
| Notifies that a previously raised node warning has been cleared&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:FatalError.adoc[`&colon;&colon;FatalError`]
| Report an unrecoverable error, flag the validation state as failed, and notify the node to shut down&period;
|===

== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:node/KernelNotifications.adoc[`KernelNotifications`] 
| Kernel notification handler that tracks chain state for code above the validation layer&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
