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

Function mk_failed_htlc_badonion

lightningd/peer_htlcs.c:95–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95static struct failed_htlc *mk_failed_htlc_badonion(const tal_t *ctx,
96 const struct htlc_in *hin,
97 enum onion_wire badonion)
98{
99 struct failed_htlc *f = tal(ctx, struct failed_htlc);
100
101 f->id = hin->key.id;
102 f->onion = NULL;
103 f->badonion = badonion;
104 f->sha256_of_onion = tal(f, struct sha256);
105 sha256(f->sha256_of_onion, hin->onion_routing_packet,
106 sizeof(hin->onion_routing_packet));
107 return f;
108}
109
110static struct failed_htlc *mk_failed_htlc(const tal_t *ctx,
111 const struct htlc_in *hin,

Callers 3

fail_in_htlcFunction · 0.85
peer_htlcsFunction · 0.85

Calls 1

sha256Class · 0.70

Tested by

no test coverage detected