You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: eclair-core/src/main/scala/fr/acinq/eclair/payment/relay/ChannelRelay.scala
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -388,10 +388,10 @@ class ChannelRelay private(nodeParams: NodeParams,
388
388
.sortWith {
389
389
// we always prioritize private channels to avoid exhausting our public channels and disabling them or lowering their htlc_maximum_msat
390
390
case (channel1, channel2) if channel1.commitments.announceChannel != channel2.commitments.announceChannel =>!channel1.commitments.announceChannel
391
-
// otherwise, we use the lowest available capacity to ensure we keep high-capacity channels for big payments
392
-
case (channel1, channel2) if channel1.commitments.capacity!= channel2.commitments.capacity=> channel1.commitments.capacity<= channel2.commitments.capacity
393
-
// otherwise, we use the lowest available balance to increase our incoming liquidity
394
-
case (channel1, channel2) => channel1.commitments.availableBalanceForSend<= channel2.commitments.availableBalanceForSend
391
+
// otherwise, we use the lowest available balance to enusre we keep higher balances for larger payments
392
+
case (channel1, channel2) if channel1.commitments.availableBalanceForSend!= channel2.commitments.availableBalanceForSend=> channel1.commitments.availableBalanceForSend<= channel2.commitments.availableBalanceForSend
393
+
// otherwise, we use the lowest available capacity as a last discriminator to have a fully defined sorting algorithm
394
+
case (channel1, channel2) => channel1.commitments.capacity<= channel2.commitments.capacity
0 commit comments