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

Function htlc_success_tx

common/htlc_tx.c:77–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77struct 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. */
102void htlc_success_tx_add_witness(struct bitcoin_tx *htlc_success,

Callers 2

add_htlcsFunction · 0.50
report_htlcsFunction · 0.50

Calls 2

htlc_txFunction · 0.85
htlc_success_feeFunction · 0.85

Tested by 1

report_htlcsFunction · 0.40