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

Method updateHeadersSyncProgressLabel

src/qt/bitcoingui.cpp:968–975  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

966}
967
968void BitcoinGUI::updateHeadersSyncProgressLabel()
969{
970 int64_t headersTipTime = clientModel->getHeaderTipTime();
971 int headersTipHeight = clientModel->getHeaderTipHeight();
972 int estHeadersLeft = (GetTime() - headersTipTime) / Params().GetConsensus().nPowTargetSpacing;
973 if (estHeadersLeft > HEADER_HEIGHT_DELTA_SYNC)
974 progressBarLabel->setText(tr("Syncing Headers (%1%)…").arg(QString::number(100.0 / (headersTipHeight+estHeadersLeft)*headersTipHeight, 'f', 1)));
975}
976
977void BitcoinGUI::openOptionsDialogWithTab(OptionsDialog::Tab tab)
978{

Callers

nothing calls this directly

Calls 5

GetTimeFunction · 0.85
getHeaderTipTimeMethod · 0.80
getHeaderTipHeightMethod · 0.80
setTextMethod · 0.80
ParamsClass · 0.50

Tested by

no test coverage detected