| 119 | } |
| 120 | |
| 121 | struct route_hop *route_from_dijkstra(const tal_t *ctx, |
| 122 | const struct gossmap *map, |
| 123 | const struct dijkstra *dij, |
| 124 | const struct gossmap_node *src, |
| 125 | struct amount_msat final_amount, |
| 126 | u32 final_cltv) |
| 127 | { |
| 128 | struct route_hop *hops = tal_arr(ctx, struct route_hop, 0); |
| 129 | |
| 130 | if (!dijkstra_to_hops(&hops, map, dij, src, &final_amount, &final_cltv)) |
| 131 | return tal_free(hops); |
| 132 | |
| 133 | return hops; |
| 134 | } |