| 93 | } |
| 94 | |
| 95 | static 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 | |
| 110 | static struct failed_htlc *mk_failed_htlc(const tal_t *ctx, |
| 111 | const struct htlc_in *hin, |
no test coverage detected