| 74 | } |
| 75 | |
| 76 | u8 *towire_abortfmtv(const tal_t *ctx, |
| 77 | const struct channel_id *channel, |
| 78 | const char *fmt, |
| 79 | va_list ap) |
| 80 | { |
| 81 | /* BOLT #1: |
| 82 | * |
| 83 | * The channel is referred to by `channel_id`, unless `channel_id` is |
| 84 | * 0 (i.e. all bytes are 0), in which case it refers to all |
| 85 | * channels. */ |
| 86 | static const struct channel_id all_channels; |
| 87 | char *estr; |
| 88 | u8 *msg; |
| 89 | |
| 90 | estr = tal_vfmt(ctx, fmt, ap); |
| 91 | /* We need tal_len to work, so we use copy. */ |
| 92 | msg = towire_tx_abort(ctx, channel ? channel : &all_channels, |
| 93 | (u8 *)tal_dup_arr(estr, char, estr, strlen(estr), 0)); |
| 94 | tal_free(estr); |
| 95 | |
| 96 | return msg; |
| 97 | } |
| 98 | |
| 99 | u8 *towire_abortfmt(const tal_t *ctx, |
| 100 | const struct channel_id *channel, |
no test coverage detected