| 108 | } |
| 109 | |
| 110 | CAmount CachedTxGetCredit(const CWallet& wallet, const CWalletTx& wtx, bool avoid_reuse) |
| 111 | { |
| 112 | AssertLockHeld(wallet.cs_wallet); |
| 113 | |
| 114 | // Must wait until coinbase is safely deep enough in the chain before valuing it |
| 115 | if (wallet.IsTxImmatureCoinBase(wtx)) |
| 116 | return 0; |
| 117 | |
| 118 | // GetBalance can assume transactions in mapWallet won't change |
| 119 | return GetCachableAmount(wallet, wtx, CWalletTx::CREDIT, avoid_reuse); |
| 120 | } |
| 121 | |
| 122 | CAmount CachedTxGetDebit(const CWallet& wallet, const CWalletTx& wtx, bool avoid_reuse) |
| 123 | { |
no test coverage detected