Skip to content

Commit

Permalink
More lock updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Tranz5 committed Aug 16, 2014
1 parent b00275c commit 846c5a6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/qt/bitcoingui.cpp
Expand Up @@ -579,6 +579,10 @@ void BitcoinGUI::aboutClicked()
void BitcoinGUI::blocksIconClicked() void BitcoinGUI::blocksIconClicked()
{ {


TRY_LOCK(cs_main, lockMain);
if(!lockMain)
return;

int unit = clientModel->getOptionsModel()->getDisplayUnit(); int unit = clientModel->getOptionsModel()->getDisplayUnit();


message(tr("Extended Block Chain Information"), message(tr("Extended Block Chain Information"),
Expand Down Expand Up @@ -656,20 +660,20 @@ void BitcoinGUI::connectionIconClicked()
CClientUIInterface::MODAL, CClientUIInterface::MODAL,
tr("%1") tr("%1")
.arg(strAllPeer)); .arg(strAllPeer));



} }


void BitcoinGUI::stakingIconClicked() void BitcoinGUI::stakingIconClicked()
{ {


TRY_LOCK(cs_main, lockMain);
if(!lockMain)
return;

uint64 nMinWeight = 0, nMaxWeight = 0; uint64 nMinWeight = 0, nMaxWeight = 0;
walletStack->getStakeWeight(nMinWeight,nMaxWeight,nWeight); walletStack->getStakeWeight(nMinWeight,nMaxWeight,nWeight);


int unit = clientModel->getOptionsModel()->getDisplayUnit(); int unit = clientModel->getOptionsModel()->getDisplayUnit();



message(tr("Extended Staking Information"), message(tr("Extended Staking Information"),
tr("Client Version: %1\n" tr("Client Version: %1\n"
"Protocol Version: %2\n\n" "Protocol Version: %2\n\n"
Expand Down Expand Up @@ -704,8 +708,6 @@ void BitcoinGUI::stakingIconClicked()
.arg(walletStack->getTotStakeWeight()) .arg(walletStack->getTotStakeWeight())
.arg(BitcoinUnits::formatWithUnit(unit, clientModel->getMoneySupply(), false)) .arg(BitcoinUnits::formatWithUnit(unit, clientModel->getMoneySupply(), false))
,CClientUIInterface::MODAL); ,CClientUIInterface::MODAL);


} }


void BitcoinGUI::gotoOverviewPage() void BitcoinGUI::gotoOverviewPage()
Expand Down

0 comments on commit 846c5a6

Please sign in to comment.