diff --git a/lightning/src/routing/scoring.rs b/lightning/src/routing/scoring.rs index 4fb8d8ba7d4..ad49bf76259 100644 --- a/lightning/src/routing/scoring.rs +++ b/lightning/src/routing/scoring.rs @@ -1192,7 +1192,7 @@ fn success_probability( // Because our numerator and denominator max out at 0.0078125 we need to multiply them // by quite a large factor to get something useful (ideally in the 2^30 range). - const BILLIONISH: f64 = 32.0 * 1024.0 * 1024.0 * 1024.0; + const BILLIONISH: f64 = 16.0 * 1024.0 * 1024.0 * 1024.0; let numerator = (num * BILLIONISH) as u64 + 1; let denominator = (den * BILLIONISH) as u64 + 1; debug_assert!(numerator <= 1 << 30, "Got large numerator ({}) from float {}.", numerator, num);