2023-05-10 22:29:17 +02:00
|
|
|
// Copyright (c) 2023 The Bitcoin Core developers
|
|
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
|
|
#include <node/kernel_notifications.h>
|
|
|
|
|
|
|
|
|
|
#include <node/interface_ui.h>
|
2023-05-10 22:36:04 +02:00
|
|
|
#include <util/translation.h>
|
2023-05-10 22:29:17 +02:00
|
|
|
|
|
|
|
|
namespace node {
|
|
|
|
|
|
|
|
|
|
void KernelNotifications::blockTip(SynchronizationState state, CBlockIndex& index)
|
|
|
|
|
{
|
|
|
|
|
uiInterface.NotifyBlockTip(state, &index);
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-10 22:35:49 +02:00
|
|
|
void KernelNotifications::headerTip(SynchronizationState state, int64_t height, int64_t timestamp, bool presync)
|
|
|
|
|
{
|
|
|
|
|
uiInterface.NotifyHeaderTip(state, height, timestamp, presync);
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-10 22:36:04 +02:00
|
|
|
void KernelNotifications::progress(const bilingual_str& title, int progress_percent, bool resume_possible)
|
|
|
|
|
{
|
|
|
|
|
uiInterface.ShowProgress(title.translated, progress_percent, resume_possible);
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-10 22:29:17 +02:00
|
|
|
} // namespace node
|