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

Function shadow_route_init

plugins/libplugin-pay.c:3281–3296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3279 */
3280
3281static struct shadow_route_data *shadow_route_init(struct payment *p)
3282{
3283 struct shadow_route_data *d = tal(p, struct shadow_route_data), *pd;
3284
3285 /* If we're not the root we need to inherit the flags set only on the
3286 * root payment. Since we inherit them at each step it's sufficient to
3287 * do so from our direct parent. */
3288 if (p->parent != NULL) {
3289 pd = payment_mod_shadowroute_get_data(p->parent);
3290 d->fuzz_amount = pd->fuzz_amount;
3291 d->use_shadow = pd->use_shadow;
3292 } else {
3293 d->fuzz_amount = true;
3294 }
3295 return d;
3296}
3297
3298/* Mutual recursion */
3299static struct command_result *shadow_route_listchannels(struct command *cmd,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected