File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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 ) )
You can’t perform that action at this time.
0 commit comments