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

Function add_layer

plugins/askrene/askrene.c:364–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362};
363
364static void add_layer(const struct layer ***layers,
365 const struct layer *l,
366 const struct gossmap *gossmap,
367 struct gossmap_localmods *localmods,
368 fp16_t *capacities)
369{
370 tal_arr_expand(layers, l);
371 /* FIXME: Implement localmods_merge, and cache this in layer? */
372 layer_add_localmods(l, gossmap, localmods);
373
374 /* Clear any entries in capacities array if we
375 * override them (incl local channels) */
376 layer_clear_overridden_capacities(l, gossmap, capacities);
377}
378
379/* Gather layers, clear capacities where layers contains info */
380static const struct layer **apply_layers(const tal_t *ctx,

Callers 2

apply_layersFunction · 0.70
do_getroutesFunction · 0.70

Calls 2

layer_add_localmodsFunction · 0.85

Tested by

no test coverage detected