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

Function local_fail_in_htlc

lightningd/peer_htlcs.c:274–283  ·  view source on GitHub ↗

This is used for cases where we can immediately fail the HTLC. */

Source from the content-addressed store, hash-verified

272
273/* This is used for cases where we can immediately fail the HTLC. */
274void local_fail_in_htlc(struct htlc_in *hin, const u8 *failmsg TAKES)
275{
276 struct onionreply *failonion = create_onionreply(NULL,
277 hin->shared_secret,
278 failmsg);
279
280 tal_free_if_taken(failmsg);
281
282 fail_in_htlc(hin, take(failonion));
283}
284
285/* Helper to create (common) WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS */
286const u8 *failmsg_incorrect_or_unknown(const tal_t *ctx,

Callers 11

drop_to_chainFunction · 0.70
handle_localpayFunction · 0.70
forward_htlcFunction · 0.70
htlc_accepted_hook_finalFunction · 0.70
check_already_failedFunction · 0.70
onchain_failed_our_htlcFunction · 0.70
peer_got_revokeFunction · 0.70
htlcs_resubmitFunction · 0.70

Calls 3

create_onionreplyFunction · 0.85
tal_free_if_takenFunction · 0.85
fail_in_htlcFunction · 0.85

Tested by

no test coverage detected