| 155 | } |
| 156 | |
| 157 | static bool channel_is_between(const struct gossmap *gossmap, |
| 158 | const struct route_hop *route, |
| 159 | const struct gossmap_node *a, |
| 160 | const struct gossmap_node *b) |
| 161 | { |
| 162 | const struct gossmap_chan *c = gossmap_find_chan(gossmap, &route->scid); |
| 163 | |
| 164 | if (c->half[route->direction].nodeidx |
| 165 | != gossmap_node_idx(gossmap, a)) |
| 166 | return false; |
| 167 | if (c->half[!route->direction].nodeidx |
| 168 | != gossmap_node_idx(gossmap, b)) |
| 169 | return false; |
| 170 | |
| 171 | return true; |
| 172 | } |
| 173 | |
| 174 | /* route_can_carry disregards unless *both* dirs are enabled, so we use |
| 175 | * a simpler variant here */ |
no test coverage detected