Which direction are we? False if neither. */
| 247 | |
| 248 | /* Which direction are we? False if neither. */ |
| 249 | static inline bool local_direction(struct routing_state *rstate, |
| 250 | const struct chan *chan, |
| 251 | int *direction) |
| 252 | { |
| 253 | for (int dir = 0; dir <= 1; (dir)++) { |
| 254 | if (node_id_eq(&chan->nodes[dir]->id, &rstate->local_id)) { |
| 255 | if (direction) |
| 256 | *direction = dir; |
| 257 | return true; |
| 258 | } |
| 259 | } |
| 260 | return false; |
| 261 | } |
| 262 | |
| 263 | static inline struct chan * |
| 264 | get_channel(const struct routing_state *rstate, |
no test coverage detected