diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2012-06-18 08:32:33 +0200 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2012-11-13 07:56:48 +0100 |
commit | 966a0e8cc94f2590521e0a2513e0cea32b5bb005 (patch) | |
tree | a6fb31a0f82a7edc186bd46f1478f3d75930368f /src/wallet.cpp | |
parent | 0d5b1d2a3e0c154da2228632524a077b2b65aa2a (diff) |
add CWalletTx::GetImmatureCredit() and use it in CWallet::GetImmatureBalance()
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r-- | src/wallet.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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<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; |