MCPcopy Create free account
hub / github.com/ElementsProject/elements / handleNotifyBlockTip

Method handleNotifyBlockTip

src/node/interfaces.cpp:323–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321 return MakeHandler(::uiInterface.BannedListChanged_connect(fn));
322 }
323 std::unique_ptr<Handler> handleNotifyBlockTip(NotifyBlockTipFn fn) override
324 {
325 return MakeHandler(::uiInterface.NotifyBlockTip_connect([fn](SynchronizationState sync_state, const CBlockIndex* block) {
326 fn(sync_state, BlockTip{block->nHeight, block->GetBlockTime(), block->GetBlockHash()},
327 GuessVerificationProgress(block, Params().GetConsensus().nPowTargetSpacing));
328 }));
329 }
330 std::unique_ptr<Handler> handleNotifyHeaderTip(NotifyHeaderTipFn fn) override
331 {
332 return MakeHandler(

Callers 1

Calls 6

MakeHandlerFunction · 0.85
fnFunction · 0.85
ParamsClass · 0.70
GetBlockTimeMethod · 0.45
GetBlockHashMethod · 0.45

Tested by

no test coverage detected