Calculate how many millisatoshi we need at the start of this route * to get msatoshi to the end. */
| 2886 | /* Calculate how many millisatoshi we need at the start of this route |
| 2887 | * to get msatoshi to the end. */ |
| 2888 | static bool route_msatoshi(struct amount_msat *total, |
| 2889 | const struct amount_msat msat, |
| 2890 | const struct route_info *route, size_t num_route) |
| 2891 | { |
| 2892 | *total = msat; |
| 2893 | for (ssize_t i = num_route - 1; i >= 0; i--) { |
| 2894 | if (!amount_msat_add_fee(total, |
| 2895 | route[i].fee_base_msat, |
| 2896 | route[i].fee_proportional_millionths)) |
| 2897 | return false; |
| 2898 | } |
| 2899 | return true; |
| 2900 | } |
| 2901 | |
| 2902 | /* The pubkey to use is the destination of this routehint. */ |
| 2903 | static const struct node_id *route_pubkey(const struct payment *p, |
no test coverage detected