MCPcopy Create free account
hub / github.com/ElementsProject/lightning / htlc_timeout_tx

Function htlc_timeout_tx

common/htlc_tx.c:129–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129struct bitcoin_tx *htlc_timeout_tx(const tal_t *ctx,
130 const struct chainparams *chainparams,
131 const struct bitcoin_outpoint *commit,
132 const u8 *commit_wscript,
133 struct amount_msat htlc_msatoshi,
134 u32 cltv_expiry,
135 u16 to_self_delay,
136 u32 feerate_per_kw,
137 const struct keyset *keyset,
138 bool option_anchor_outputs)
139{
140 /* BOLT #3:
141 * * locktime: `0` for HTLC-success, `cltv_expiry` for HTLC-timeout
142 */
143 return htlc_tx(ctx, chainparams, commit,
144 commit_wscript, htlc_msatoshi, to_self_delay,
145 &keyset->self_revocation_key,
146 &keyset->self_delayed_payment_key,
147 htlc_timeout_fee(feerate_per_kw,
148 option_anchor_outputs),
149 cltv_expiry,
150 option_anchor_outputs);
151}
152
153/* Fill in the witness for HTLC-timeout tx produced above. */
154void htlc_timeout_tx_add_witness(struct bitcoin_tx *htlc_timeout,

Callers 2

add_htlcsFunction · 0.50
report_htlcsFunction · 0.50

Calls 2

htlc_txFunction · 0.85
htlc_timeout_feeFunction · 0.85

Tested by 1

report_htlcsFunction · 0.40