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

Function local_fail_in_htlc

lightningd/peer_htlcs.c:191–201  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

189
190/* This is used for cases where we can immediately fail the HTLC. */
191void local_fail_in_htlc(struct htlc_in *hin, const u8 *failmsg TAKES)
192{
193 struct onionreply *failonion = create_onionreply(NULL,
194 hin->shared_secret,
195 failmsg);
196
197 if (taken(failmsg))
198 tal_free(failmsg);
199
200 fail_in_htlc(hin, take(failonion));
201}
202
203/* Helper to create (common) WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS */
204const u8 *failmsg_incorrect_or_unknown_(const tal_t *ctx,

Callers 12

handle_localpayFunction · 0.85
forward_htlcFunction · 0.85
htlc_accepted_hook_finalFunction · 0.85
check_already_failedFunction · 0.85
fail_dangling_htlc_inFunction · 0.85
onchain_failed_our_htlcFunction · 0.85
peer_got_revokeFunction · 0.85
htlcs_resubmitFunction · 0.85
htlc_set_failFunction · 0.85
htlc_set_addFunction · 0.85

Calls 4

takenFunction · 0.85
tal_freeFunction · 0.85
fail_in_htlcFunction · 0.85
create_onionreplyFunction · 0.50

Tested by

no test coverage detected