aboutsummaryrefslogtreecommitdiff
path: root/src/node/kernel_notifications.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/node/kernel_notifications.h')
-rw-r--r--src/node/kernel_notifications.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/node/kernel_notifications.h b/src/node/kernel_notifications.h
index f4d97a0fff..e37f4d4e1e 100644
--- a/src/node/kernel_notifications.h
+++ b/src/node/kernel_notifications.h
@@ -15,18 +15,24 @@ class CBlockIndex;
enum class SynchronizationState;
struct bilingual_str;
+namespace kernel {
+enum class Warning;
+} // namespace kernel
+
namespace util {
class SignalInterrupt;
} // namespace util
namespace node {
+class Warnings;
static constexpr int DEFAULT_STOPATHEIGHT{0};
class KernelNotifications : public kernel::Notifications
{
public:
- KernelNotifications(util::SignalInterrupt& shutdown, std::atomic<int>& exit_status) : m_shutdown(shutdown), m_exit_status{exit_status} {}
+ KernelNotifications(util::SignalInterrupt& shutdown, std::atomic<int>& exit_status, node::Warnings& warnings)
+ : m_shutdown(shutdown), m_exit_status{exit_status}, m_warnings{warnings} {}
[[nodiscard]] kernel::InterruptResult blockTip(SynchronizationState state, CBlockIndex& index) override;
@@ -34,7 +40,9 @@ public:
void progress(const bilingual_str& title, int progress_percent, bool resume_possible) override;
- void warning(const bilingual_str& warning) override;
+ void warningSet(kernel::Warning id, const bilingual_str& message) override;
+
+ void warningUnset(kernel::Warning id) override;
void flushError(const bilingual_str& message) override;
@@ -47,6 +55,7 @@ public:
private:
util::SignalInterrupt& m_shutdown;
std::atomic<int>& m_exit_status;
+ node::Warnings& m_warnings;
};
void ReadNotificationArgs(const ArgsManager& args, KernelNotifications& notifications);