diff options
| author | Wladimir J. van der Laan <[email protected]> | 2012-11-12 23:33:46 -0800 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2012-11-12 23:33:46 -0800 |
| commit | f2b12807d04e981d0a252cbda6ba80c87a809d6e (patch) | |
| tree | a6fb31a0f82a7edc186bd46f1478f3d75930368f /src/wallet.cpp | |
| parent | Merge pull request #2002 from alexanderkjeldaas/clang-warnings (diff) | |
| parent | add CWalletTx::GetImmatureCredit() and use it in CWallet::GetImmatureBalance() (diff) | |
| download | discoin-f2b12807d04e981d0a252cbda6ba80c87a809d6e.tar.xz discoin-f2b12807d04e981d0a252cbda6ba80c87a809d6e.zip | |
Merge pull request #1479 from Diapolo/wallet_add_GetImmatureCredit
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 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; |