mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
kernel: Add progress method to notifications
This commit is part of the libbitcoinkernel project and seeks to remove the ChainstateManager's and, more generally, the kernel library's dependency on interface_ui with options methods in this and the following few commits. By removing interface_ui from the kernel library, its dependency on boost is reduced to just boost::multi_index.
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include <functional>
|
||||
#include <iosfwd>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
@@ -94,6 +95,10 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
std::cout << "Header tip changed: " << height << ", " << timestamp << ", " << presync << std::endl;
|
||||
}
|
||||
void progress(const bilingual_str& title, int progress_percent, bool resume_possible) override
|
||||
{
|
||||
std::cout << "Progress: " << title.original << ", " << progress_percent << ", " << resume_possible << std::endl;
|
||||
}
|
||||
};
|
||||
auto notifications = std::make_unique<KernelNotifications>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user