Skip to content

Commit 5861dde

Browse files
committed
Allow routefinding again due to HTLC limit based on >= not >
While this doesn't matter much in practice, if we go around again when route-finding to try to meet an htlc_minimum_msat, we use the `recommended_value_msat` which can work if we meet the `htlc_minimum_msat` on a channel exactly, so using >= rather than > can capture cases with 1msat more.
1 parent 082a19b commit 5861dde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/routing/router.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1788,9 +1788,9 @@ where L::Target: Logger {
17881788
#[allow(unused_comparisons)] // $next_hops_path_htlc_minimum_msat is 0 in some calls so rustc complains
17891789
let may_overpay_to_meet_path_minimum_msat =
17901790
((amount_to_transfer_over_msat < $candidate.htlc_minimum_msat() &&
1791-
recommended_value_msat > $candidate.htlc_minimum_msat()) ||
1791+
recommended_value_msat >= $candidate.htlc_minimum_msat()) ||
17921792
(amount_to_transfer_over_msat < $next_hops_path_htlc_minimum_msat &&
1793-
recommended_value_msat > $next_hops_path_htlc_minimum_msat));
1793+
recommended_value_msat >= $next_hops_path_htlc_minimum_msat));
17941794

17951795
let payment_failed_on_this_channel = scid_opt.map_or(false,
17961796
|scid| payment_params.previously_failed_channels.contains(&scid));

0 commit comments

Comments
 (0)