mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-02 20:54:23 +01:00
dijkstra: fix heap ordering.
We were always ordering heap by distance, not score (which are different if we are routing by cheapest, not shortest!). This simplifies our callbacks, too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -52,7 +52,7 @@ static struct route **least_cost(struct gossmap *map,
|
||||
tstart = time_mono();
|
||||
dij = dijkstra(tmpctx, map, dst,
|
||||
sent, riskfactor, route_can_carry,
|
||||
route_path_cheaper, NULL);
|
||||
route_score_cheaper, NULL);
|
||||
tstop = time_mono();
|
||||
|
||||
printf("# Time to find route: %"PRIu64" usec\n",
|
||||
|
||||
Reference in New Issue
Block a user