mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-12 18:49:42 +01:00
route: Simplify direction
This commit is contained in:
parent
cf09314b3b
commit
29df2c9f40
1 changed files with 1 additions and 6 deletions
|
@ -94,12 +94,7 @@ static bool dijkstra_to_hops(struct route_hop **hops,
|
|||
/* OK, populate other fields. */
|
||||
c = dijkstra_best_chan(dij, curidx);
|
||||
|
||||
if (c->half[0].nodeidx == curidx) {
|
||||
(*hops)[num_hops].direction = 0;
|
||||
} else {
|
||||
assert(c->half[1].nodeidx == curidx);
|
||||
(*hops)[num_hops].direction = 1;
|
||||
}
|
||||
(*hops)[num_hops].direction = c->half[0].nodeidx == curidx ? 0 : 1;
|
||||
(*hops)[num_hops].scid = gossmap_chan_scid(gossmap, c);
|
||||
|
||||
/* Find other end of channel. */
|
||||
|
|
Loading…
Add table
Reference in a new issue