Calculate how many millisatoshi we need at the start of this route * to get msatoshi to the end. */
| 2600 | /* Calculate how many millisatoshi we need at the start of this route |
| 2601 | * to get msatoshi to the end. */ |
| 2602 | static bool route_msatoshi(struct amount_msat *total, |
| 2603 | const struct amount_msat msat, |
| 2604 | const struct route_info *route, size_t num_route) |
| 2605 | { |
| 2606 | *total = msat; |
| 2607 | for (ssize_t i = num_route - 1; i >= 0; i--) { |
| 2608 | if (!amount_msat_add_fee(total, |
| 2609 | route[i].fee_base_msat, |
| 2610 | route[i].fee_proportional_millionths)) |
| 2611 | return false; |
| 2612 | } |
| 2613 | return true; |
| 2614 | } |
| 2615 | |
| 2616 | /* The pubkey to use is the destination of this routehint. */ |
| 2617 | static const struct node_id *route_pubkey(const struct payment *p, |
no test coverage detected