From 391da3f3b237fce4a6f4a9eeb44ee8583bf91185 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Thu, 14 Sep 2023 14:14:03 +0200 Subject: [PATCH] Use `saturating_add` when adding inflight HTLCs values Previously this calculation could overflow, leading to panicking in `debug`. --- lightning/src/routing/router.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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