| 75 | } |
| 76 | |
| 77 | struct bitcoin_tx *htlc_success_tx(const tal_t *ctx, |
| 78 | const struct chainparams *chainparams, |
| 79 | const struct bitcoin_outpoint *commit, |
| 80 | const u8 *commit_wscript, |
| 81 | struct amount_msat htlc_msatoshi, |
| 82 | u16 to_self_delay, |
| 83 | u32 feerate_per_kw, |
| 84 | const struct keyset *keyset, |
| 85 | bool option_anchor_outputs) |
| 86 | { |
| 87 | /* BOLT #3: |
| 88 | * * locktime: `0` for HTLC-success, `cltv_expiry` for HTLC-timeout |
| 89 | */ |
| 90 | return htlc_tx(ctx, chainparams, commit, |
| 91 | commit_wscript, htlc_msatoshi, |
| 92 | to_self_delay, |
| 93 | &keyset->self_revocation_key, |
| 94 | &keyset->self_delayed_payment_key, |
| 95 | htlc_success_fee(feerate_per_kw, |
| 96 | option_anchor_outputs), |
| 97 | 0, |
| 98 | option_anchor_outputs); |
| 99 | } |
| 100 | |
| 101 | /* Fill in the witness for HTLC-success tx produced above. */ |
| 102 | void htlc_success_tx_add_witness(struct bitcoin_tx *htlc_success, |