From 75b39da8bcbe4d4add5169a8f1889451270adb83 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 24 Mar 2022 18:38:43 +0000 Subject: [PATCH] Don't consider a path as having hit HTLC-min if it isn't sufficient During routing, if we find a path which isn't contributing sufficient value to be considered useful, but which did hit the HTLC minimum of the path and was also rejected for that reason, we shouldn't consider it to be a failure ...........XXX MOAR TEXTZ --- 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 fbdefb984..8a4d8a0db 100644 --- a/lightning/src/routing/router.rs +++ b/lightning/src/routing/router.rs @@ -917,7 +917,7 @@ where L::Target: Logger { // Since we're choosing amount_to_transfer_over_msat as maximum possible, it can // be only reduced later (not increased), so this channel should just be skipped // as not sufficient. - if !over_path_minimum_msat && doesnt_exceed_cltv_delta_limit { + if contributes_sufficient_value && !over_path_minimum_msat && doesnt_exceed_cltv_delta_limit { hit_minimum_limit = true; } else if contributes_sufficient_value && doesnt_exceed_cltv_delta_limit { // Note that low contribution here (limited by available_liquidity_msat) -- 2.39.5