From: Matt Corallo Date: Thu, 24 Mar 2022 18:38:43 +0000 (+0000) Subject: Don't consider a path as having hit HTLC-min if it isn't sufficient X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=refs%2Fheads%2F2022-03-no-log-0;p=rust-lightning 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 --- 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)