|
|
@ -748,6 +748,15 @@ void BitcoinGUI::setNetworkActive(bool networkActive) |
|
|
|
updateNetworkState(); |
|
|
|
updateNetworkState(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void BitcoinGUI::updateHeadersSyncProgressLabel() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
int64_t headersTipTime = clientModel->getHeaderTipTime(); |
|
|
|
|
|
|
|
int headersTipHeight = clientModel->getHeaderTipHeight(); |
|
|
|
|
|
|
|
int estHeadersLeft = (GetTime() - headersTipTime)/600; |
|
|
|
|
|
|
|
if (estHeadersLeft > REQ_HEADER_HEIGHT_DELTA_SYNC) |
|
|
|
|
|
|
|
progressBarLabel->setText(tr("Syncing Headers (%1%)...").arg(QString::number(100.0 / (headersTipHeight+estHeadersLeft)*headersTipHeight, 'f', 1))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool header) |
|
|
|
void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool header) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (modalOverlay) |
|
|
|
if (modalOverlay) |
|
|
@ -768,9 +777,11 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer |
|
|
|
switch (blockSource) { |
|
|
|
switch (blockSource) { |
|
|
|
case BLOCK_SOURCE_NETWORK: |
|
|
|
case BLOCK_SOURCE_NETWORK: |
|
|
|
if (header) { |
|
|
|
if (header) { |
|
|
|
|
|
|
|
updateHeadersSyncProgressLabel(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
progressBarLabel->setText(tr("Synchronizing with network...")); |
|
|
|
progressBarLabel->setText(tr("Synchronizing with network...")); |
|
|
|
|
|
|
|
updateHeadersSyncProgressLabel(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case BLOCK_SOURCE_DISK: |
|
|
|
case BLOCK_SOURCE_DISK: |
|
|
|
if (header) { |
|
|
|
if (header) { |
|
|
@ -786,8 +797,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer |
|
|
|
if (header) { |
|
|
|
if (header) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
// Case: not Importing, not Reindexing and no network connection
|
|
|
|
progressBarLabel->setText(tr("Connecting to peers...")); |
|
|
|
progressBarLabel->setText(tr("No block source available...")); |
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|