From 966a0e8cc94f2590521e0a2513e0cea32b5bb005 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Mon, 18 Jun 2012 08:32:33 +0200 Subject: add CWalletTx::GetImmatureCredit() and use it in CWallet::GetImmatureBalance() --- src/wallet.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/wallet.cpp') diff --git a/src/wallet.cpp b/src/wallet.cpp index ae9f695e9f..0115e56b8e 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -926,9 +926,8 @@ int64 CWallet::GetImmatureBalance() const LOCK(cs_wallet); for (map::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; -- cgit v1.2.3