mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
kernel: Add headerTip 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:
@@ -32,6 +32,7 @@
|
||||
#include <validationinterface.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <filesystem>
|
||||
#include <functional>
|
||||
#include <iosfwd>
|
||||
@@ -89,6 +90,10 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
std::cout << "Block tip changed" << std::endl;
|
||||
}
|
||||
void headerTip(SynchronizationState, int64_t height, int64_t timestamp, bool presync) override
|
||||
{
|
||||
std::cout << "Header tip changed: " << height << ", " << timestamp << ", " << presync << std::endl;
|
||||
}
|
||||
};
|
||||
auto notifications = std::make_unique<KernelNotifications>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user