The synchronization progress bar now compares the amount of total blocks to amount of blocks downloaded at application start-up. Could be probably implemented better.

This commit is contained in:
Janne Pulkkinen
2011-09-10 12:43:45 +03:00
committed by Wladimir J. van der Laan
parent 9b9e2f1748
commit 78b3bf56f7
3 changed files with 14 additions and 2 deletions

View File

@@ -345,6 +345,7 @@ void BitcoinGUI::setNumConnections(int count)
void BitcoinGUI::setNumBlocks(int count)
{
int initTotal = clientModel->getNumBlocksAtStartup();
int total = clientModel->getTotalBlocksEstimate();
QString tooltip;
@@ -352,8 +353,8 @@ void BitcoinGUI::setNumBlocks(int count)
{
progressBarLabel->setVisible(true);
progressBar->setVisible(true);
progressBar->setMaximum(total);
progressBar->setValue(count);
progressBar->setMaximum(total - initTotal);
progressBar->setValue(count - initTotal);
tooltip = tr("Downloaded %1 of %2 blocks of transaction history.").arg(count).arg(total);
}
else