route: return NULL if destination is unreachable.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-10-20 14:28:06 +10:30
parent 1bf3eebbf6
commit 30bf6706b7
4 changed files with 11 additions and 6 deletions

View File

@@ -69,7 +69,7 @@ static struct route **least_cost(struct gossmap *map,
return NULL;
}
path = route_from_dijkstra(map, dij, src);
path = route_from_dijkstra(map, map, dij, src);
printf("# path length %zu\n", tal_count(path));
/* We don't pay fee on first hop! */
if (!amount_msat_sub(&fee,