diff --git a/lightning/src/routing/scoring.rs b/lightning/src/routing/scoring.rs index ead7d4ffada..6501504f3bd 100644 --- a/lightning/src/routing/scoring.rs +++ b/lightning/src/routing/scoring.rs @@ -1939,7 +1939,7 @@ mod bucketed_history { bucket_weight *= bucket_weight; let bucket_prob_times_billion = bucket_weight * 1024 * 1024 * 1024 / total_valid_points_tracked; - debug_assert!(bucket_prob_times_billion <= 1 << 30); + debug_assert!(bucket_prob_times_billion <= u32::MAX.into()); cumulative_success_prob_times_billion += (bucket_prob_times_billion as u64) * numerator / denominator; } @@ -1953,7 +1953,7 @@ mod bucketed_history { bucket_weight *= bucket_weight; let bucket_prob_times_billion = bucket_weight * 1024 * 1024 * 1024 / total_valid_points_tracked; - debug_assert!(bucket_prob_times_billion <= 1 << 30); + debug_assert!(bucket_prob_times_billion <= u32::MAX.into()); if payment_pos >= max_bucket_end_pos { // Success probability 0, the payment amount may be above the max liquidity break;