mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Fix progress reporting issue
Reimplementation of https://github.com/Blockstream/liquid/pull/6
This commit is contained in:
parent
e9f6e82bbf
commit
5b8c79ac9d
7 changed files with 87 additions and 27 deletions
|
|
@ -179,7 +179,7 @@ class NodeImpl : public Node
|
|||
LOCK(::cs_main);
|
||||
tip = ::chainActive.Tip();
|
||||
}
|
||||
return GuessVerificationProgress(Params().TxData(), tip);
|
||||
return GuessVerificationProgress(tip, Params().GetConsensus().nPowTargetSpacing);
|
||||
}
|
||||
bool isInitialBlockDownload() override { return IsInitialBlockDownload(); }
|
||||
bool getReindex() override { return ::fReindex; }
|
||||
|
|
@ -266,7 +266,7 @@ class NodeImpl : public Node
|
|||
{
|
||||
return MakeHandler(::uiInterface.NotifyBlockTip_connect([fn](bool initial_download, const CBlockIndex* block) {
|
||||
fn(initial_download, block->nHeight, block->GetBlockTime(),
|
||||
GuessVerificationProgress(Params().TxData(), block));
|
||||
GuessVerificationProgress(block, Params().GetConsensus().nPowTargetSpacing));
|
||||
}));
|
||||
}
|
||||
std::unique_ptr<Handler> handleNotifyHeaderTip(NotifyHeaderTipFn fn) override
|
||||
|
|
@ -274,7 +274,7 @@ class NodeImpl : public Node
|
|||
return MakeHandler(
|
||||
::uiInterface.NotifyHeaderTip_connect([fn](bool initial_download, const CBlockIndex* block) {
|
||||
fn(initial_download, block->nHeight, block->GetBlockTime(),
|
||||
GuessVerificationProgress(Params().TxData(), block));
|
||||
GuessVerificationProgress(block, Params().GetConsensus().nPowTargetSpacing));
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue