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

Function sendpay_errmsg_fmt

lightningd/pay.c:228–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228static const char *sendpay_errmsg_fmt(const tal_t *ctx, enum jsonrpc_errcode pay_errcode,
229 const struct routing_failure *fail,
230 const char *details)
231{
232 char *errmsg;
233 if (pay_errcode == PAY_UNPARSEABLE_ONION)
234 errmsg = "Malformed error reply";
235 else {
236 assert(fail);
237 errmsg = tal_fmt(ctx, "failed: %s (%s)",
238 onion_wire_name(fail->failcode), details);
239 }
240 return errmsg;
241}
242
243/* onionreply used if pay_errcode == PAY_UNPARSEABLE_ONION */
244static struct command_result *

Callers 3

tell_waiters_failedFunction · 0.85
wait_paymentFunction · 0.85
send_payment_coreFunction · 0.85

Calls 1

onion_wire_nameFunction · 0.85

Tested by

no test coverage detected