From: Elias Rohrer Date: Thu, 14 Sep 2023 12:14:03 +0000 (+0200) Subject: Use `saturating_add` when adding inflight HTLCs values X-Git-Tag: v0.0.117-rc1~15^2~7 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=391da3f3b237fce4a6f4a9eeb44ee8583bf91185;p=rust-lightning Use `saturating_add` when adding inflight HTLCs values Previously this calculation could overflow, leading to panicking in `debug`. --- diff --git a/lightning/src/routing/router.rs b/lightning/src/routing/router.rs index 09d83bb78..0e3bc96ea 100644 --- a/lightning/src/routing/router.rs +++ b/lightning/src/routing/router.rs @@ -139,7 +139,7 @@ impl<'a, SP: Sized, Sc: 'a + ScoreLookUp, S: Deref