mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
BlockTip struct created and connected to notifyHeaderTip and notifyBlockTip signals.
This commit is contained in:
@@ -315,7 +315,7 @@ public:
|
||||
std::unique_ptr<Handler> handleNotifyBlockTip(NotifyBlockTipFn fn) override
|
||||
{
|
||||
return MakeHandler(::uiInterface.NotifyBlockTip_connect([fn](SynchronizationState sync_state, const CBlockIndex* block) {
|
||||
fn(sync_state, block->GetBlockHash(), block->nHeight, block->GetBlockTime(),
|
||||
fn(sync_state, BlockTip{block->nHeight, block->GetBlockTime(), block->GetBlockHash()},
|
||||
GuessVerificationProgress(Params().TxData(), block));
|
||||
}));
|
||||
}
|
||||
@@ -323,7 +323,7 @@ public:
|
||||
{
|
||||
return MakeHandler(
|
||||
::uiInterface.NotifyHeaderTip_connect([fn](SynchronizationState sync_state, const CBlockIndex* block) {
|
||||
fn(sync_state, block->GetBlockHash(), block->nHeight, block->GetBlockTime(),
|
||||
fn(sync_state, BlockTip{block->nHeight, block->GetBlockTime(), block->GetBlockHash()},
|
||||
/* verification progress is unused when a header was received */ 0);
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user