| 2454 | } |
| 2455 | |
| 2456 | void *payment_mod_get_data(const struct payment *p, |
| 2457 | const struct payment_modifier *mod) |
| 2458 | { |
| 2459 | for (size_t i = 0; p->modifiers[i] != NULL; i++) |
| 2460 | if (p->modifiers[i] == mod) |
| 2461 | return p->modifier_data[i]; |
| 2462 | |
| 2463 | /* If we ever get here it means that we asked for the data for a |
| 2464 | * non-existent modifier. This is a compile-time/wiring issue, so we |
| 2465 | * better check that modifiers match the data we ask for. */ |
| 2466 | abort(); |
| 2467 | } |
| 2468 | |
| 2469 | static struct retry_mod_data *retry_data_init(struct payment *p); |
| 2470 | |