MCPcopy Create free account
hub / github.com/ElementsProject/lightning / towire_errorfmtv

Function towire_errorfmtv

common/wire_error.c:8–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include <wire/peer_wire.h>
7
8u8 *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
25u8 *towire_errorfmt(const tal_t *ctx,
26 const struct channel_id *channel,

Callers 1

towire_errorfmtFunction · 0.85

Calls 1

tal_freeFunction · 0.85

Tested by

no test coverage detected