MCPcopy Create free account
hub / github.com/ElementsProject/lightning / new_route_query

Function new_route_query

plugins/askrene/child/child.c:186–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184
185
186static 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
211void run_child(const struct gossmap *gossmap,
212 const struct layer **layers,

Callers 1

run_childFunction · 0.85

Calls 1

gossmap_max_chan_idxFunction · 0.85

Tested by

no test coverage detected