Don't consider a path as having hit HTLC-min if it isn't sufficient 2022-03-no-log-0
authorMatt Corallo <git@bluematt.me>
Thu, 24 Mar 2022 18:38:43 +0000 (18:38 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 24 Mar 2022 18:38:43 +0000 (18:38 +0000)
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

index fbdefb9840a80d4c38ebc32007e8b39ab6d31ed8..8a4d8a0db341610e82374e1dad92ebaac9470c90 100644 (file)
@@ -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)