This is used for cases where we can immediately fail the HTLC. */
| 189 | |
| 190 | /* This is used for cases where we can immediately fail the HTLC. */ |
| 191 | void local_fail_in_htlc(struct htlc_in *hin, const u8 *failmsg TAKES) |
| 192 | { |
| 193 | struct onionreply *failonion = create_onionreply(NULL, |
| 194 | hin->shared_secret, |
| 195 | failmsg); |
| 196 | |
| 197 | if (taken(failmsg)) |
| 198 | tal_free(failmsg); |
| 199 | |
| 200 | fail_in_htlc(hin, take(failonion)); |
| 201 | } |
| 202 | |
| 203 | /* Helper to create (common) WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS */ |
| 204 | const u8 *failmsg_incorrect_or_unknown_(const tal_t *ctx, |
no test coverage detected