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