Squeeze total costs into a u32 */
| 33 | |
| 34 | /* Squeeze total costs into a u32 */ |
| 35 | static u32 costs_to_score(struct amount_msat fee, |
| 36 | struct amount_msat risk) |
| 37 | { |
| 38 | u64 costs = fee.millisatoshis + risk.millisatoshis; /* Raw: score */ |
| 39 | if (costs > 0xFFFFFFFF) |
| 40 | costs = 0xFFFFFFFF; |
| 41 | return costs; |
| 42 | } |
| 43 | |
| 44 | /* Prioritize distance over costs */ |
| 45 | u64 route_score_shorter(struct amount_msat fee, |
no outgoing calls
no test coverage detected