Skip to content

Commit

Permalink
route: Re-add the assertion that we're one side of a channel
Browse files Browse the repository at this point in the history
  • Loading branch information
cdecker committed Oct 7, 2024
1 parent 3845b84 commit ddc199f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ddc199f

Please sign in to comment.