diff options
author | TheCharlatan <seb.kung@gmail.com> | 2023-05-10 22:36:04 +0200 |
---|---|---|
committer | TheCharlatan <seb.kung@gmail.com> | 2023-05-20 12:03:26 +0200 |
commit | 4452707edec91c7d7991f486dd41ef3edb4f7fbf (patch) | |
tree | 4f06c4ad2e74d53af4ed1bd5f2325a5602ba0ee6 /src/bitcoin-chainstate.cpp | |
parent | 84d71457e7250ab25c0a11d1ad1c7657197ffd90 (diff) |
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.
Diffstat (limited to 'src/bitcoin-chainstate.cpp')
-rw-r--r-- | src/bitcoin-chainstate.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bitcoin-chainstate.cpp b/src/bitcoin-chainstate.cpp index a184d64ff0..b949bafcc8 100644 --- a/src/bitcoin-chainstate.cpp +++ b/src/bitcoin-chainstate.cpp @@ -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>(); |