| 394 | } |
| 395 | |
| 396 | static void payment_exclude_most_expensive(struct payment *p) |
| 397 | { |
| 398 | struct route_hop *e = &p->route[0]; |
| 399 | struct amount_msat fee, worst = AMOUNT_MSAT(0); |
| 400 | |
| 401 | for (size_t i = 0; i < tal_count(p->route)-1; i++) { |
| 402 | if (!amount_msat_sub(&fee, p->route[i].amount, p->route[i+1].amount)) |
| 403 | paymod_err(p, "Negative fee in a route."); |
| 404 | |
| 405 | if (amount_msat_greater_eq(fee, worst)) { |
| 406 | e = &p->route[i]; |
| 407 | worst = fee; |
| 408 | } |
| 409 | } |
| 410 | channel_hints_update(p, e->scid, e->direction, false, false, |
| 411 | NULL, NULL); |
| 412 | } |
| 413 | |
| 414 | static void payment_exclude_longest_delay(struct payment *p) |
| 415 | { |
no test coverage detected