aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-chainstate.cpp
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2023-05-10 22:35:49 +0200
committerTheCharlatan <seb.kung@gmail.com>2023-05-20 12:03:24 +0200
commit84d71457e7250ab25c0a11d1ad1c7657197ffd90 (patch)
tree6c5afbeb85868942088aee8407a837c026c1586c /src/bitcoin-chainstate.cpp
parent447761c8228d58f948aae7e73ed079c028cacb97 (diff)
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.
Diffstat (limited to 'src/bitcoin-chainstate.cpp')
-rw-r--r--src/bitcoin-chainstate.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bitcoin-chainstate.cpp b/src/bitcoin-chainstate.cpp
index 91acc34054..a184d64ff0 100644
--- a/src/bitcoin-chainstate.cpp
+++ b/src/bitcoin-chainstate.cpp
@@ -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>();