This is used for cases where we can immediately fail the HTLC. */
| 272 | |
| 273 | /* This is used for cases where we can immediately fail the HTLC. */ |
| 274 | void local_fail_in_htlc(struct htlc_in *hin, const u8 *failmsg TAKES) |
| 275 | { |
| 276 | struct onionreply *failonion = create_onionreply(NULL, |
| 277 | hin->shared_secret, |
| 278 | failmsg); |
| 279 | |
| 280 | tal_free_if_taken(failmsg); |
| 281 | |
| 282 | fail_in_htlc(hin, take(failonion)); |
| 283 | } |
| 284 | |
| 285 | /* Helper to create (common) WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS */ |
| 286 | const u8 *failmsg_incorrect_or_unknown(const tal_t *ctx, |
no test coverage detected