Permalink
Browse files

Add ReserveBalance to Extended PoS Information

  • Loading branch information...
Tranz5 committed Jul 20, 2014
1 parent 82ae703 commit 1f8d4405e172059b8c14ca89925207120bfa008c
Showing with 33 additions and 8 deletions.
  1. +8 −6 src/qt/bitcoingui.cpp
  2. +5 −0 src/qt/walletmodel.cpp
  3. +2 −0 src/qt/walletmodel.h
  4. +7 −2 src/walletstack.cpp
  5. +2 −0 src/walletstack.h
  6. +7 −0 src/walletview.cpp
  7. +2 −0 src/walletview.h
@@ -684,12 +684,13 @@ void BitcoinGUI::stakingIconClicked()
"Current PoS Yearly Interest: %7\%\n\n"
"Current Wallet Viewed: %8\n"
"Current Wallet Version: %9\n"
"Current Wallet PoS Weight: %10\n\n"
"Stake for Charity Address: %11\n"
"Stake for Charity Percentage: %12\n\n"
"Total Wallets Loaded: %13\n"
"Total Wallets PoS Weight: %14\n\n"
"Network Money Supply: %15\n")
"Current Wallet PoS Weight: %10\n"
"Current Wallet Reserve Balance: %11\n\n"
"Stake for Charity Address: %12\n"
"Stake for Charity Percentage: %13\n\n"
"Total Wallets Loaded: %14\n"
"Total Wallets PoS Weight: %15\n\n"
"Network Money Supply: %16\n")
.arg(clientModel->formatFullVersion())
.arg(clientModel->getProtocolVersion())
.arg(clientModel->getLastPoSBlock())
@@ -700,6 +701,7 @@ void BitcoinGUI::stakingIconClicked()
.arg(walletStack->getCurrentWallet())
.arg(walletStack->getWalletVersion())
.arg(nWeight)
.arg(BitcoinUnits::formatWithUnit(unit, walletStack->getReserveBalance()))
.arg(walletStack->getStakeForCharityAddress())
.arg(walletStack->getStakeForCharityPercent())
.arg(walletManager->GetWalletCount())
@@ -406,6 +406,11 @@ void WalletModel::getStakeWeight(uint64& nMinWeight, uint64& nMaxWeight, uint64&
wallet->GetStakeWeight(*wallet, nMinWeight, nMaxWeight, nWeight);
}
quint64 WalletModel::getReserveBalance()
{
return wallet->nReserveBalance;
}
uint64 WalletModel::getTotStakeWeight()
{
@@ -108,6 +108,8 @@ class WalletModel : public QObject
// PoS Information
void getStakeWeight(quint64& nMinWeight, quint64& nMaxWeight, quint64& nWeight);
quint64 getTotStakeWeight();
/** Give user information about reserve balance */
quint64 getReserveBalance();
// PoS Information about value and time
void getStakeWeightFromValue(const qint64& nTime, const qint64& nValue, quint64& nWeight);
// Wallet Information about Stake For Charity
@@ -253,6 +253,13 @@ void WalletStack::getStakeWeight(quint64& nMinWeight, quint64& nMaxWeight, quint
if (walletView) walletView->getStakeWeight(nMinWeight,nMaxWeight,nWeight);
}
quint64 WalletStack::getReserveBalance()
{
WalletView *walletView = (WalletView*)currentWidget();
if (walletView) return walletView->getReserveBalance();
return 0;
}
quint64 WalletStack::getTotStakeWeight()
{
WalletView *walletView = (WalletView*)currentWidget();
@@ -287,5 +294,3 @@ QString WalletStack::getStakeForCharityAddress()
if (walletView) return walletView->getStakeForCharityAddress();
return "";
}
@@ -107,6 +107,8 @@ public slots:
/** Give user information about staking */
void getStakeWeight(quint64& nMinWeight, quint64& nMaxWeight, quint64& nWeight);
quint64 getTotStakeWeight();
/** Give user information about reserve balance */
quint64 getReserveBalance();
/** Give user information about Stake For Charity */
int getStakeForCharityPercent();
QString getStakeForCharityAddress();
@@ -653,6 +653,13 @@ void WalletView::getStakeWeight(uint64& nMinWeight, uint64& nMaxWeight, uint64&
walletModel->getStakeWeight(nMinWeight,nMaxWeight,nWeight);
}
quint64 WalletView::getReserveBalance()
{
if(!walletModel)
return 0;
return walletModel->getReserveBalance();
}
quint64 WalletView::getTotStakeWeight()
{
if(!walletModel)
@@ -151,6 +151,8 @@ public slots:
/** Give user information about staking */
void getStakeWeight(quint64& nMinWeight, quint64& nMaxWeight, quint64& nWeight);
quint64 getTotStakeWeight();
/** Give user information about reserve balance */
quint64 getReserveBalance();
/** Give user information about Stake For Charity */
int getStakeForCharityPercent();
QString getStakeForCharityAddress();

0 comments on commit 1f8d440

Please sign in to comment.