Skip to content

Commit 3181bb6

Browse files
cdeckerrustyrussell
authored andcommitted
route: Re-add the assertion that we're one side of a channel
1 parent 8b58c5b commit 3181bb6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

common/route.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ static bool dijkstra_to_hops(struct route_hop **hops,
9494
/* OK, populate other fields. */
9595
c = dijkstra_best_chan(dij, curidx);
9696

97+
assert(c->half[0].nodeidx == curidx || c->half[1].nodeidx == curidx);
9798
(*hops)[num_hops].direction = c->half[0].nodeidx == curidx ? 0 : 1;
9899
(*hops)[num_hops].scid = gossmap_chan_scid(gossmap, c);
99100

0 commit comments

Comments
 (0)