| 23 | static struct command_result *handle_failure(struct routefail *r); |
| 24 | |
| 25 | struct 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 | |
| 46 | static struct command_result *routefail_end(struct routefail *r TAKES) |
| 47 | { |
no test coverage detected