| 6 | #include <wire/peer_wire.h> |
| 7 | |
| 8 | u8 *towire_errorfmtv(const tal_t *ctx, |
| 9 | const struct channel_id *channel, |
| 10 | const char *fmt, |
| 11 | va_list ap) |
| 12 | { |
| 13 | char *estr; |
| 14 | u8 *msg; |
| 15 | |
| 16 | estr = tal_vfmt(ctx, fmt, ap); |
| 17 | /* We need tal_len to work, so we use copy. */ |
| 18 | msg = towire_error(ctx, channel, |
| 19 | (u8 *)tal_dup_arr(estr, char, estr, strlen(estr), 0)); |
| 20 | tal_free(estr); |
| 21 | |
| 22 | return msg; |
| 23 | } |
| 24 | |
| 25 | u8 *towire_errorfmt(const tal_t *ctx, |
| 26 | const struct channel_id *channel, |
no test coverage detected