Merge pull request #519 from UdjinM6/v0.12.0.x_hide_oosw_on_bc

V0.12.0.x hide "out of sync" warning on blockchain sync
This commit is contained in:
evan82 2015-08-14 07:39:18 -07:00
commit ea8d508561

View File

@ -769,14 +769,18 @@ void BitcoinGUI::setNumBlocks(int count)
":/movies/spinner-%1").arg(spinnerFrame, 3, 10, QChar('0'))) ":/movies/spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')))
.pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); .pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
spinnerFrame = (spinnerFrame + 1) % SPINNER_FRAMES; spinnerFrame = (spinnerFrame + 1) % SPINNER_FRAMES;
progressBar->setMaximum(4 * MASTERNODE_SYNC_THRESHOLD);
prevAttempt = masternodeSync.RequestedMasternodeAttempt + 1; prevAttempt = masternodeSync.RequestedMasternodeAttempt + 1;
prevAssets = masternodeSync.RequestedMasternodeAssets; prevAssets = masternodeSync.RequestedMasternodeAssets;
if(prevAttempt <= MASTERNODE_SYNC_THRESHOLD) progress = prevAttempt + (prevAssets - 1) * MASTERNODE_SYNC_THRESHOLD; if(prevAttempt <= MASTERNODE_SYNC_THRESHOLD) progress = prevAttempt + (prevAssets - 1) * MASTERNODE_SYNC_THRESHOLD;
progressBar->setValue(progress); progressBar->setValue(progress);
#ifdef ENABLE_WALLET
if(walletFrame)
walletFrame->showOutOfSyncWarning(false);
#endif // ENABLE_WALLET
} }
switch (masternodeSync.RequestedMasternodeAssets) { switch (masternodeSync.RequestedMasternodeAssets) {
case MASTERNODE_SYNC_SPORKS: case MASTERNODE_SYNC_SPORKS:
progressBar->setMaximum(4 * MASTERNODE_SYNC_THRESHOLD);
progressBarLabel->setText(tr("Synchronizing sporks...")); progressBarLabel->setText(tr("Synchronizing sporks..."));
break; break;
case MASTERNODE_SYNC_LIST: case MASTERNODE_SYNC_LIST:
@ -789,10 +793,6 @@ void BitcoinGUI::setNumBlocks(int count)
progressBarLabel->setText(tr("Synchronizing budgets...")); progressBarLabel->setText(tr("Synchronizing budgets..."));
break; break;
case MASTERNODE_SYNC_FINISHED: case MASTERNODE_SYNC_FINISHED:
#ifdef ENABLE_WALLET
if(walletFrame)
walletFrame->showOutOfSyncWarning(false);
#endif // ENABLE_WALLET
progressBarLabel->setVisible(false); progressBarLabel->setVisible(false);
progressBar->setVisible(false); progressBar->setVisible(false);
labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));