| 2013 | } |
| 2014 | |
| 2015 | CAmount CWallet::GetUnconfirmedBalance() const |
| 2016 | { |
| 2017 | CAmount nTotal = 0; |
| 2018 | { |
| 2019 | LOCK2(cs_main, cs_wallet); |
| 2020 | for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) { |
| 2021 | const CWalletTx* pcoin = &(*it).second; |
| 2022 | if (!IsFinalTx(*pcoin) || (!pcoin->IsTrusted() && pcoin->GetDepthInMainChain() == 0)) |
| 2023 | nTotal += pcoin->GetAvailableCredit(); |
| 2024 | } |
| 2025 | } |
| 2026 | return nTotal; |
| 2027 | } |
| 2028 | |
| 2029 | CAmount CWallet::GetImmatureBalance() const |
| 2030 | { |
no test coverage detected