Skip to content

Commit 3da2e55

Browse files
committed
f more clear, i guesS?
1 parent 99b2554 commit 3da2e55

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
@@ -1649,8 +1649,8 @@ where L::Target: Logger {
16491649
debug_assert_eq!(selected_route.iter().map(|p| p.get_value_msat()).sum::<u64>(), already_collected_value_msat);
16501650
let mut overpaid_value_msat = already_collected_value_msat - final_value_msat;
16511651

1652-
// First, sort by the cost-per-value of the path, selecting only the paths which
1653-
// contribute the most per cost.
1652+
// First, sort by the cost-per-value of the path, dropping the paths which cost the most for
1653+
// the value they contribute towards the payment amount.
16541654
// We sort backwards as we will remove from the front in `retain`, next.
16551655
selected_route.sort_unstable_by(|a, b|
16561656
(((b.get_cost_msat() as u128) << 64) / (b.get_value_msat() as u128))

0 commit comments

Comments
 (0)