Skip to content

Commit 23381fa

Browse files
committed
fixup! Prioritize private channels when relaying payments
1 parent 64e4940 commit 23381fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eclair-core/src/main/scala/fr/acinq/eclair/payment/relay/ChannelRelay.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ class ChannelRelay private(nodeParams: NodeParams,
387387
.toList // needed for ordering
388388
.sortWith {
389389
// we always prioritize private channels to avoid exhausting our public channels and disabling them or lowering their htlc_maximum_msat
390-
case (channel1, channel2) if channel1.commitments.announceChannel != channel2.commitments.announceChannel => channel2.commitments.announceChannel
390+
case (channel1, channel2) if channel1.commitments.announceChannel != channel2.commitments.announceChannel => !channel1.commitments.announceChannel
391391
// otherwise, we use the lowest available capacity to ensure we keep high-capacity channels for big payments
392392
case (channel1, channel2) if channel1.commitments.capacity != channel2.commitments.capacity => channel1.commitments.capacity <= channel2.commitments.capacity
393393
// otherwise, we use the lowest available balance to increase our incoming liquidity

0 commit comments

Comments
 (0)