mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-07 03:03:58 +01:00
Added best block hash to the NotifyHeaderTip and NotifyBlockTip signals.
[ClientModel] best header/block hash cached.
This commit is contained in:
@@ -149,6 +149,9 @@ public:
|
||||
//! Get num blocks.
|
||||
virtual int getNumBlocks() = 0;
|
||||
|
||||
//! Get best block hash.
|
||||
virtual uint256 getBestBlockHash() = 0;
|
||||
|
||||
//! Get last block time.
|
||||
virtual int64_t getLastBlockTime() = 0;
|
||||
|
||||
@@ -250,12 +253,12 @@ public:
|
||||
|
||||
//! Register handler for block tip messages.
|
||||
using NotifyBlockTipFn =
|
||||
std::function<void(SynchronizationState, int height, int64_t block_time, double verification_progress)>;
|
||||
std::function<void(SynchronizationState, const uint256& block_hash, int height, int64_t block_time, double verification_progress)>;
|
||||
virtual std::unique_ptr<Handler> handleNotifyBlockTip(NotifyBlockTipFn fn) = 0;
|
||||
|
||||
//! Register handler for header tip messages.
|
||||
using NotifyHeaderTipFn =
|
||||
std::function<void(SynchronizationState, int height, int64_t block_time, double verification_progress)>;
|
||||
std::function<void(SynchronizationState, const uint256& block_hash, int height, int64_t block_time, double verification_progress)>;
|
||||
virtual std::unique_ptr<Handler> handleNotifyHeaderTip(NotifyHeaderTipFn fn) = 0;
|
||||
|
||||
//! Return pointer to internal chain interface, useful for testing.
|
||||
|
||||
Reference in New Issue
Block a user