| 188 | } |
| 189 | |
| 190 | static struct failed_htlc *mk_failed_htlc_badonion(const tal_t *ctx, |
| 191 | const struct htlc_in *hin, |
| 192 | enum onion_wire badonion) |
| 193 | { |
| 194 | struct failed_htlc *f = tal(ctx, struct failed_htlc); |
| 195 | |
| 196 | /* Inside a blinded path, override return */ |
| 197 | if (blind_error_return(hin)) |
| 198 | return mk_failed_htlc(ctx, hin, NULL); |
| 199 | |
| 200 | f->id = hin->key.id; |
| 201 | f->onion = NULL; |
| 202 | f->badonion = badonion; |
| 203 | f->sha256_of_onion = tal(f, struct sha256); |
| 204 | sha256(f->sha256_of_onion, hin->onion_routing_packet, |
| 205 | sizeof(hin->onion_routing_packet)); |
| 206 | return f; |
| 207 | } |
| 208 | |
| 209 | static void tell_channeld_htlc_failed(const struct htlc_in *hin, |
| 210 | const struct failed_htlc *failed_htlc) |
no test coverage detected