| 184 | |
| 185 | |
| 186 | static struct route_query *new_route_query(const tal_t *ctx, |
| 187 | const struct gossmap *gossmap, |
| 188 | const char *cmd_id, |
| 189 | const struct layer **layers, |
| 190 | const s8 *biases, |
| 191 | const struct additional_cost_htable *additional_costs, |
| 192 | struct reserve_htable *reserved, |
| 193 | fp16_t *capacities TAKES) |
| 194 | { |
| 195 | struct route_query *rq = tal(ctx, struct route_query); |
| 196 | |
| 197 | rq->gossmap = gossmap; |
| 198 | rq->cmd_id = tal_strdup(rq, cmd_id); |
| 199 | rq->layers = layers; |
| 200 | rq->biases = biases; |
| 201 | rq->additional_costs = additional_costs; |
| 202 | rq->reserved = reserved; |
| 203 | rq->capacities = tal_dup_talarr(rq, fp16_t, capacities); |
| 204 | rq->disabled_chans = |
| 205 | tal_arrz(rq, bitmap, |
| 206 | 2 * BITMAP_NWORDS(gossmap_max_chan_idx(gossmap))); |
| 207 | |
| 208 | return rq; |
| 209 | } |
| 210 | |
| 211 | void run_child(const struct gossmap *gossmap, |
| 212 | const struct layer **layers, |
no test coverage detected