We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acfc0bf commit 384a500Copy full SHA for 384a500
lightning/src/routing/router.rs
@@ -1506,9 +1506,8 @@ where L::Target: Logger {
1506
// prefer lower cost paths.
1507
cur_route.sort_unstable_by(|a, b| {
1508
a.get_value_msat().cmp(&b.get_value_msat())
1509
- // Reverse ordering for fees, so we drop higher-fee paths first
1510
- .then_with(|| b.get_total_fee_paid_msat().saturating_add(b.get_path_penalty_msat())
1511
- .cmp(&a.get_total_fee_paid_msat().saturating_add(a.get_path_penalty_msat())))
+ // Reverse ordering for cost, so we drop higher-cost paths first
+ .then_with(|| b.get_cost_msat().cmp(&a.get_cost_msat()))
1512
});
1513
1514
// We should make sure that at least 1 path left.
0 commit comments