| 129 | } |
| 130 | |
| 131 | static bool channel_is_between(const struct gossmap *gossmap, |
| 132 | const struct route_hop *route, |
| 133 | const struct gossmap_node *a, |
| 134 | const struct gossmap_node *b) |
| 135 | { |
| 136 | const struct gossmap_chan *c = gossmap_find_chan(gossmap, &route->scid); |
| 137 | if (c->half[route->direction].nodeidx |
| 138 | != gossmap_node_idx(gossmap, a)) |
| 139 | return false; |
| 140 | if (c->half[!route->direction].nodeidx |
| 141 | != gossmap_node_idx(gossmap, b)) |
| 142 | return false; |
| 143 | |
| 144 | return true; |
| 145 | } |
| 146 | |
| 147 | /* route_can_carry disregards unless *both* dirs are enabled, so we use |
| 148 | * a simpler variant here */ |
no test coverage detected