mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
BlockTip struct created and connected to notifyHeaderTip and notifyBlockTip signals.
This commit is contained in:
parent
2f867203b0
commit
a06e845e82
4 changed files with 22 additions and 14 deletions
|
|
@ -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);
|
||||
}));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue