| 2472 | struct payment *p); |
| 2473 | |
| 2474 | static struct retry_mod_data * |
| 2475 | retry_data_init(struct payment *p) |
| 2476 | { |
| 2477 | struct retry_mod_data *rdata = tal(p, struct retry_mod_data); |
| 2478 | struct retry_mod_data *parent_rdata; |
| 2479 | |
| 2480 | /* We start the retry counter from scratch for the root payment, or if |
| 2481 | * the parent was split, meaning this is a new attempt with new |
| 2482 | * amounts. */ |
| 2483 | if (p->parent == NULL || p->parent->step == PAYMENT_STEP_SPLIT) { |
| 2484 | rdata->retries = 10; |
| 2485 | } else { |
| 2486 | parent_rdata = payment_mod_retry_get_data(p->parent); |
| 2487 | rdata->retries = parent_rdata->retries - 1; |
| 2488 | } |
| 2489 | return rdata; |
| 2490 | } |
| 2491 | |
| 2492 | /* Determine whether retrying could possibly succeed. Retrying in this case |
| 2493 | * means that we repeat the entire flow, including computing a new route, new |
nothing calls this directly
no outgoing calls
no test coverage detected