Skip to content

Commit dfd6a1b

Browse files
TheBlueMattjkczyz
authored andcommitted
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.
1 parent 6ceb5f6 commit dfd6a1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/routing/router.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ where L::Target: Logger {
917917
// Since we're choosing amount_to_transfer_over_msat as maximum possible, it can
918918
// be only reduced later (not increased), so this channel should just be skipped
919919
// as not sufficient.
920-
if !over_path_minimum_msat && doesnt_exceed_cltv_delta_limit {
920+
if contributes_sufficient_value && !over_path_minimum_msat && doesnt_exceed_cltv_delta_limit {
921921
hit_minimum_limit = true;
922922
} else if contributes_sufficient_value && doesnt_exceed_cltv_delta_limit {
923923
// Note that low contribution here (limited by available_liquidity_msat)

0 commit comments

Comments
 (0)