Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/node.cpp
Show First 20 Lines • Show All 356 Lines • ▼ Show 20 Lines | public: | ||||
return MakeHandler(::uiInterface.NotifyBlockTip_connect( | return MakeHandler(::uiInterface.NotifyBlockTip_connect( | ||||
[fn](bool initial_download, const CBlockIndex *block) { | [fn](bool initial_download, const CBlockIndex *block) { | ||||
fn(initial_download, block->nHeight, block->GetBlockTime(), | fn(initial_download, block->nHeight, block->GetBlockTime(), | ||||
GuessVerificationProgress(Params().TxData(), block)); | GuessVerificationProgress(Params().TxData(), block)); | ||||
})); | })); | ||||
} | } | ||||
std::unique_ptr<Handler> | std::unique_ptr<Handler> | ||||
handleNotifyHeaderTip(NotifyHeaderTipFn fn) override { | handleNotifyHeaderTip(NotifyHeaderTipFn fn) override { | ||||
/* verification progress is unused when a header was received */ | |||||
return MakeHandler(::uiInterface.NotifyHeaderTip_connect( | return MakeHandler(::uiInterface.NotifyHeaderTip_connect( | ||||
[fn](bool initial_download, const CBlockIndex *block) { | [fn](bool initial_download, const CBlockIndex *block) { | ||||
fn(initial_download, block->nHeight, block->GetBlockTime(), | fn(initial_download, block->nHeight, block->GetBlockTime(), | ||||
GuessVerificationProgress(Params().TxData(), block)); | 0); | ||||
})); | })); | ||||
} | } | ||||
NodeContext *context() override { return m_context; } | NodeContext *context() override { return m_context; } | ||||
void setContext(NodeContext *context) override { | void setContext(NodeContext *context) override { | ||||
m_context = context; | m_context = context; | ||||
if (context) { | if (context) { | ||||
m_context_ref.Set(*context); | m_context_ref.Set(*context); | ||||
} else { | } else { | ||||
Show All 13 Lines |