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

Function tal_report_error

plugins/renepay/routebuilder.c:108–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108static void tal_report_error(const tal_t *ctx, enum jsonrpc_errcode *ecode,
109 const char **fail,
110 enum jsonrpc_errcode error_value, const char *fmt,
111 ...)
112{
113 tal_t *this_ctx = tal(ctx, tal_t);
114
115 va_list ap;
116 const char *str;
117
118 va_start(ap, fmt);
119 str = tal_vfmt(this_ctx, fmt, ap);
120 va_end(ap);
121
122 if (ecode)
123 *ecode = error_value;
124
125 if (fail)
126 *fail = tal_fmt(ctx, "%s", str);
127
128 this_ctx = tal_free(this_ctx);
129}
130
131/* Routes are computed and saved in the payment for later use. */
132struct route **get_routes(const tal_t *ctx,

Callers 1

get_routesFunction · 0.85

Calls 1

tal_freeFunction · 0.85

Tested by

no test coverage detected