| 155 | } |
| 156 | |
| 157 | CAmountMap CachedTxGetCredit(const CWallet& wallet, const CWalletTx& wtx, const isminefilter& filter) |
| 158 | { |
| 159 | // Must wait until coinbase is safely deep enough in the chain before valuing it |
| 160 | if (wallet.IsTxImmatureCoinBase(wtx)) |
| 161 | return CAmountMap(); |
| 162 | |
| 163 | CAmountMap credit; |
| 164 | if (filter & ISMINE_SPENDABLE) { |
| 165 | // GetBalance can assume transactions in mapWallet won't change |
| 166 | credit += GetCachableAmount(wallet, wtx, CWalletTx::CREDIT, ISMINE_SPENDABLE); |
| 167 | } |
| 168 | if (filter & ISMINE_WATCH_ONLY) { |
| 169 | credit += GetCachableAmount(wallet, wtx, CWalletTx::CREDIT, ISMINE_WATCH_ONLY); |
| 170 | } |
| 171 | return credit; |
| 172 | } |
| 173 | |
| 174 | CAmountMap CachedTxGetDebit(const CWallet& wallet, const CWalletTx& wtx, const isminefilter& filter) |
| 175 | { |
no test coverage detected