| 17 | |
| 18 | namespace wallet { |
| 19 | CInputCoin::CInputCoin(const CWallet& wallet, const CWalletTx* wtx, unsigned int i) { |
| 20 | if (!wtx || !wtx->tx) |
| 21 | throw std::invalid_argument("tx should not be null"); |
| 22 | if (i >= wtx->tx->vout.size()) |
| 23 | throw std::out_of_range("The output index is out of range"); |
| 24 | |
| 25 | outpoint = COutPoint(wtx->tx->GetHash(), i); |
| 26 | txout = wtx->tx->vout[i]; |
| 27 | effective_value = std::max<CAmount>(0, wtx->GetOutputValueOut(wallet, i)); |
| 28 | value = wtx->GetOutputValueOut(wallet, i); |
| 29 | asset = wtx->GetOutputAsset(wallet, i); |
| 30 | bf_value = wtx->GetOutputAmountBlindingFactor(wallet, i); |
| 31 | bf_asset = wtx->GetOutputAssetBlindingFactor(wallet, i); |
| 32 | } |
| 33 | |
| 34 | // Descending order comparator |
| 35 | struct { |
nothing calls this directly
no test coverage detected