aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <[email protected]>2012-06-18 08:32:33 +0200
committerPhilip Kaufmann <[email protected]>2012-11-13 07:56:48 +0100
commit966a0e8cc94f2590521e0a2513e0cea32b5bb005 (patch)
treea6fb31a0f82a7edc186bd46f1478f3d75930368f /src/wallet.cpp
parentMerge pull request #2002 from alexanderkjeldaas/clang-warnings (diff)
downloaddiscoin-966a0e8cc94f2590521e0a2513e0cea32b5bb005.tar.xz
discoin-966a0e8cc94f2590521e0a2513e0cea32b5bb005.zip
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;