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

Function routefail_start

plugins/renepay/routefail.c:25–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23static struct command_result *handle_failure(struct routefail *r);
24
25struct command_result *routefail_start(const tal_t *ctx, struct route *route,
26 struct command *cmd)
27{
28 assert(route);
29 struct routefail *r = tal(ctx, struct routefail);
30 struct payment *payment =
31 payment_map_get(pay_plugin->payment_map, route->key.payment_hash);
32
33 if (payment == NULL)
34 plugin_err(pay_plugin->plugin,
35 "%s: payment with hash %s not found.",
36 __func__,
37 fmt_sha256(tmpctx, &route->key.payment_hash));
38
39 r->payment = payment;
40 r->route = route;
41 r->cmd = cmd;
42 assert(route->result);
43 return update_gossip(r);
44}
45
46static struct command_result *routefail_end(struct routefail *r TAKES)
47{

Callers 1

Calls 3

fmt_sha256Function · 0.85
update_gossipFunction · 0.85
plugin_errFunction · 0.50

Tested by

no test coverage detected