| 2 | #include <plugins/renepay/route.h> |
| 3 | |
| 4 | struct route *new_route(const tal_t *ctx, u64 groupid, |
| 5 | u64 partid, struct sha256 payment_hash, |
| 6 | struct amount_msat amount_deliver, |
| 7 | struct amount_msat amount_sent) |
| 8 | { |
| 9 | struct route *route = tal(ctx, struct route); |
| 10 | route->key.partid = partid; |
| 11 | route->key.groupid = groupid; |
| 12 | route->key.payment_hash = payment_hash; |
| 13 | |
| 14 | route->final_error = LIGHTNINGD; |
| 15 | route->final_msg = NULL; |
| 16 | route->hops = NULL; |
| 17 | route->success_prob = 0.0; |
| 18 | route->result = NULL; |
| 19 | |
| 20 | route->amount_deliver = amount_deliver; |
| 21 | route->amount_sent = amount_sent; |
| 22 | route->path_num = -1; |
| 23 | route->shared_secrets = NULL; |
| 24 | return route; |
| 25 | } |
| 26 | |
| 27 | /* Construct a route from a flow. |
| 28 | * |
no outgoing calls