Skip to content

Commit

Permalink
fix timer causing startup fail for slow machines
Browse files Browse the repository at this point in the history
  • Loading branch information
presstab committed Aug 2, 2014
1 parent a3bea7f commit ba807c5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
connect(timerMintingIcon, SIGNAL(timeout()), this, SLOT(updateMintingIcon()));
// Add timer to update minting weights
QTimer *timerMintingWeights = new QTimer(labelMintingIcon);
timerMintingWeights->start(30 * 1000);
timerMintingWeights->start(1 * 1000);
connect(timerMintingWeights, SIGNAL(timeout()), this, SLOT(updateMintingWeights()));
// Set initial values for user and network weights
nWeight, nHoursToMaturity, nNetworkWeight = 0;
Expand Down Expand Up @@ -1092,10 +1092,11 @@ void BitcoinGUI::updateMintingWeights()

if (pwalletMain)
pwalletMain->GetStakeWeight2(*pwalletMain, nMinMax, nMinMax, nWeight, nHoursToMaturity);

if(walletModel)
{
nCharityPercent = walletModel->getStakeForCharityPercent();
strCharityAddress = walletModel->getStakeForCharityAddress();

}

if (nHoursToMaturity > 212)
nHoursToMaturity = 0;
Expand Down

0 comments on commit ba807c5

Please sign in to comment.