| 3279 | */ |
| 3280 | |
| 3281 | static 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 */ |
| 3299 | static struct command_result *shadow_route_listchannels(struct command *cmd, |
nothing calls this directly
no outgoing calls
no test coverage detected