![]() |
Bitcoin Core
25.99.0
P2P Digital Currency
|
#include <kernel_notifications.h>
Public Member Functions | |
KernelNotifications (std::atomic< int > &exit_status) | |
kernel::InterruptResult | blockTip (SynchronizationState state, CBlockIndex &index) override |
void | headerTip (SynchronizationState state, int64_t height, int64_t timestamp, bool presync) override |
void | progress (const bilingual_str &title, int progress_percent, bool resume_possible) override |
void | warning (const bilingual_str &warning) override |
void | flushError (const std::string &debug_message) override |
The flush error notification is sent to notify the user that an error occurred while flushing block data to disk. More... | |
void | fatalError (const std::string &debug_message, const bilingual_str &user_message={}) override |
The fatal error notification is sent to notify the user when an error occurs in kernel code that can't be recovered from. More... | |
![]() | |
virtual | ~Notifications () |
Public Attributes | |
int | m_stop_at_height {DEFAULT_STOPATHEIGHT} |
Block height after which blockTip notification will return Interrupted{}, if >0. More... | |
bool | m_shutdown_on_fatal_error {true} |
Useful for tests, can be set to false to avoid shutdown on fatal error. More... | |
Private Attributes | |
std::atomic< int > & | m_exit_status |
Definition at line 23 of file kernel_notifications.h.
|
inline |
Definition at line 26 of file kernel_notifications.h.
|
overridevirtual |
Reimplemented from kernel::Notifications.
Definition at line 61 of file kernel_notifications.cpp.
|
overridevirtual |
The fatal error notification is sent to notify the user when an error occurs in kernel code that can't be recovered from.
After this notification is sent, whatever function triggered the error should also return an error code or raise an exception. 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.
Reimplemented from kernel::Notifications.
Definition at line 91 of file kernel_notifications.cpp.
|
overridevirtual |
The flush error notification is sent to notify the user that an error occurred while flushing block data to disk.
Kernel code may ignore flush errors that don't affect the immediate operation it is trying to perform. 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.
Reimplemented from kernel::Notifications.
Definition at line 86 of file kernel_notifications.cpp.
|
overridevirtual |
Reimplemented from kernel::Notifications.
Definition at line 71 of file kernel_notifications.cpp.
|
overridevirtual |
Reimplemented from kernel::Notifications.
Definition at line 76 of file kernel_notifications.cpp.
|
overridevirtual |
Reimplemented from kernel::Notifications.
Definition at line 81 of file kernel_notifications.cpp.
|
private |
Definition at line 45 of file kernel_notifications.h.
bool node::KernelNotifications::m_shutdown_on_fatal_error {true} |
Useful for tests, can be set to false to avoid shutdown on fatal error.
Definition at line 43 of file kernel_notifications.h.
int node::KernelNotifications::m_stop_at_height {DEFAULT_STOPATHEIGHT} |
Block height after which blockTip notification will return Interrupted{}, if >0.
Definition at line 41 of file kernel_notifications.h.