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

Function htlc_set_fulfill

lightningd/htlc_set.c:57–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void htlc_set_fulfill(struct htlc_set *set, const struct preimage *preimage)
58{
59 for (size_t i = 0; i < tal_count(set->htlcs); i++) {
60 /* Don't remove from set */
61 tal_del_destructor2(set->htlcs[i], htlc_set_hin_destroyed, set);
62
63 /* mark that we filled -- needed for tagging coin mvt */
64 set->htlcs[i]->we_filled = tal(set->htlcs[i], bool);
65 *set->htlcs[i]->we_filled = true;
66 fulfill_htlc(set->htlcs[i], preimage);
67 }
68 tal_free(set);
69}
70
71static struct htlc_set *new_htlc_set(struct lightningd *ld,
72 struct htlc_in *hin,

Callers 1

Calls 2

fulfill_htlcFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected