| 217 | } |
| 218 | |
| 219 | struct gossmap_chan *gossmap_chan_byidx(const struct gossmap *map, u32 idx) |
| 220 | { |
| 221 | assert(idx < gossmap_max_chan_idx(map)); |
| 222 | |
| 223 | if (map->chan_arr[idx].plus_scid_off == 0) |
| 224 | return NULL; |
| 225 | return &map->chan_arr[idx]; |
| 226 | } |
| 227 | |
| 228 | /* htable can't handle NULL or 1 values, so we add 2 */ |
| 229 | static struct gossmap_chan *ptrint2chan(const ptrint_t *pidx) |
no test coverage detected