add CWalletTx::GetImmatureCredit() and use it in CWallet::GetImmatureBalance()

This commit is contained in:
Philip Kaufmann
2012-06-18 08:32:33 +02:00
parent 0d5b1d2a3e
commit 966a0e8cc9
2 changed files with 20 additions and 3 deletions

View File

@@ -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;