| 2109 | |
| 2110 | |
| 2111 | CAmount CWallet::GetBalance(const isminefilter& filter, const int min_depth) const |
| 2112 | { |
| 2113 | CAmount nTotal = 0; |
| 2114 | { |
| 2115 | LOCK2(cs_main, cs_wallet); |
| 2116 | for (const auto& entry : mapWallet) |
| 2117 | { |
| 2118 | const CWalletTx* pcoin = &entry.second; |
| 2119 | if (pcoin->IsTrusted() && pcoin->GetDepthInMainChain() >= min_depth) { |
| 2120 | nTotal += pcoin->GetAvailableCredit(true, filter); |
| 2121 | } |
| 2122 | } |
| 2123 | } |
| 2124 | |
| 2125 | return nTotal; |
| 2126 | } |
| 2127 | |
| 2128 | CAmount CWallet::GetUnconfirmedBalance() const |
| 2129 | { |
no test coverage detected