| 42 | } |
| 43 | |
| 44 | bool commit_tx_amount_trimmed(const struct htlc **htlcs, |
| 45 | u32 feerate_per_kw, |
| 46 | struct amount_sat dust_limit, |
| 47 | bool option_anchor_outputs, |
| 48 | bool option_anchors_zero_fee_htlc_tx, |
| 49 | enum side side, |
| 50 | struct amount_msat *amt) |
| 51 | { |
| 52 | for (size_t i = 0; i < tal_count(htlcs); i++) { |
| 53 | if (trim(htlcs[i], feerate_per_kw, dust_limit, |
| 54 | option_anchor_outputs, option_anchors_zero_fee_htlc_tx, |
| 55 | side)) { |
| 56 | if (!amount_msat_accumulate(amt, htlcs[i]->amount)) |
| 57 | return false; |
| 58 | } |
| 59 | } |
| 60 | return true; |
| 61 | } |
| 62 | |
| 63 | static void add_offered_htlc_out(struct bitcoin_tx *tx, size_t n, |
| 64 | const struct htlc *htlc, |
no test coverage detected