route: Re-add the assertion that we're one side of a channel

This commit is contained in:
Christian Decker 2024-10-02 17:59:35 +02:00
parent 3845b84dbc
commit ddc199ff41

View File

@ -94,6 +94,7 @@ static bool dijkstra_to_hops(struct route_hop **hops,
/* OK, populate other fields. */
c = dijkstra_best_chan(dij, curidx);
assert(c->half[0].nodeidx == curidx || c->half[1].nodeidx == curidx);
(*hops)[num_hops].direction = c->half[0].nodeidx == curidx ? 0 : 1;
(*hops)[num_hops].scid = gossmap_chan_scid(gossmap, c);