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

Function htlc_set_fail

lightningd/htlc_set.c:43–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void htlc_set_fail(struct htlc_set *set, const u8 *failmsg TAKES)
44{
45 /* Don't let local_fail_in_htlc take! */
46 if (taken(failmsg))
47 tal_steal(set, failmsg);
48
49 for (size_t i = 0; i < tal_count(set->htlcs); i++) {
50 /* Don't remove from set */
51 tal_del_destructor2(set->htlcs[i], htlc_set_hin_destroyed, set);
52 local_fail_in_htlc(set->htlcs[i], failmsg);
53 }
54 tal_free(set);
55}
56
57void htlc_set_fulfill(struct htlc_set *set, const struct preimage *preimage)
58{

Callers 5

htlc_set_hin_destroyedFunction · 0.70
timeout_htlc_setFunction · 0.70
htlc_set_addFunction · 0.70

Calls 3

takenFunction · 0.85
local_fail_in_htlcFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected