aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2012-11-12 23:33:46 -0800
committerWladimir J. van der Laan <[email protected]>2012-11-12 23:33:46 -0800
commitf2b12807d04e981d0a252cbda6ba80c87a809d6e (patch)
treea6fb31a0f82a7edc186bd46f1478f3d75930368f /src/wallet.cpp
parentMerge pull request #2002 from alexanderkjeldaas/clang-warnings (diff)
parentadd CWalletTx::GetImmatureCredit() and use it in CWallet::GetImmatureBalance() (diff)
downloaddiscoin-f2b12807d04e981d0a252cbda6ba80c87a809d6e.tar.xz
discoin-f2b12807d04e981d0a252cbda6ba80c87a809d6e.zip
Merge pull request #1479 from Diapolo/wallet_add_GetImmatureCredit
add CWalletTx::GetImmatureCredit() and use it in CWallet::GetImmatureBalance()
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index ae9f695e9..0115e56b8 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -926,9 +926,8 @@ int64 CWallet::GetImmatureBalance() const
LOCK(cs_wallet);
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
- const CWalletTx& pcoin = (*it).second;
- if (pcoin.IsCoinBase() && pcoin.GetBlocksToMaturity() > 0 && pcoin.IsInMainChain())
- nTotal += GetCredit(pcoin);
+ const CWalletTx* pcoin = &(*it).second;
+ nTotal += pcoin->GetImmatureCredit();
}
}
return nTotal;