kernel: Add warning 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.

The DoWarning and AlertNotify functions are moved out of the
validation.cpp file, which removes its dependency on interface_ui as
well as util/system.
This commit is contained in:
TheCharlatan
2023-05-08 14:49:37 +02:00
parent 4452707ede
commit f871c69191
5 changed files with 56 additions and 33 deletions

View File

@@ -99,6 +99,10 @@ int main(int argc, char* argv[])
{
std::cout << "Progress: " << title.original << ", " << progress_percent << ", " << resume_possible << std::endl;
}
void warning(const bilingual_str& warning) override
{
std::cout << "Warning: " << warning.original << std::endl;
}
};
auto notifications = std::make_unique<KernelNotifications>();