Calculate how many millisatoshi we need at the start of this route * to get msatoshi to the end. */
| 2870 | /* Calculate how many millisatoshi we need at the start of this route |
| 2871 | * to get msatoshi to the end. */ |
| 2872 | static bool route_msatoshi(struct amount_msat *total, |
| 2873 | const struct amount_msat msat, |
| 2874 | const struct route_info *route, size_t num_route) |
| 2875 | { |
| 2876 | *total = msat; |
| 2877 | for (ssize_t i = num_route - 1; i >= 0; i--) { |
| 2878 | if (!amount_msat_add_fee(total, |
| 2879 | route[i].fee_base_msat, |
| 2880 | route[i].fee_proportional_millionths)) |
| 2881 | return false; |
| 2882 | } |
| 2883 | return true; |
| 2884 | } |
| 2885 | |
| 2886 | /* The pubkey to use is the destination of this routehint. */ |
| 2887 | static const struct node_id *route_pubkey(const struct payment *p, |
no test coverage detected