add CWalletTx::GetImmatureCredit() and use it in CWallet::GetImmatureBalance()
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user