| 141 | } |
| 142 | |
| 143 | static bool channel_is_between(const struct gossmap *gossmap, |
| 144 | const struct route_hop *route, |
| 145 | const struct gossmap_node *a, |
| 146 | const struct gossmap_node *b) |
| 147 | { |
| 148 | const struct gossmap_chan *c = gossmap_find_chan(gossmap, &route->scid); |
| 149 | |
| 150 | if (c->half[route->direction].nodeidx |
| 151 | != gossmap_node_idx(gossmap, a)) |
| 152 | return false; |
| 153 | if (c->half[!route->direction].nodeidx |
| 154 | != gossmap_node_idx(gossmap, b)) |
| 155 | return false; |
| 156 | |
| 157 | return true; |
| 158 | } |
| 159 | |
| 160 | /* route_can_carry disregards unless *both* dirs are enabled, so we use |
| 161 | * a simpler variant here */ |
no test coverage detected