Skip to content

Commit 3f6ba7f

Browse files
committed
Test
1 parent a3b6d18 commit 3f6ba7f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

eclair-core/src/main/scala/fr/acinq/eclair/payment/PaymentEvents.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ object PaymentFailure {
237237
case RemoteFailure(_, hops, Sphinx.DecryptedFailurePacket(nodeId, _)) =>
238238
ignoreNodeOutgoingEdge(nodeId, hops, ignore)
239239
case UnreadableRemoteFailure(_, hops, _, holdTimes) =>
240+
// TODO: Once everyone supports attributable errors, we should only exclude two nodes: the last for which we have attribution data and the next one.
240241
// We don't know which node is sending garbage, let's blacklist all nodes except:
241242
// - the nodes that returned attribution data (except the last one)
242243
// - the one we are directly connected to: it would be too restrictive for retries

eclair-core/src/test/scala/fr/acinq/eclair/payment/PaymentLifecycleSpec.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import fr.acinq.eclair.blockchain.bitcoind.ZmqWatcher.{UtxoStatus, ValidateReque
2828
import fr.acinq.eclair.channel.Register.{ForwardShortId, ForwardShortIdFailure}
2929
import fr.acinq.eclair.channel._
3030
import fr.acinq.eclair.channel.fsm.Channel
31+
import fr.acinq.eclair.crypto.Sphinx.HoldTime
3132
import fr.acinq.eclair.crypto.{Sphinx, SphinxSpec}
3233
import fr.acinq.eclair.db.{OutgoingPayment, OutgoingPaymentStatus, PaymentType}
3334
import fr.acinq.eclair.io.Peer.PeerRoutingMessage
@@ -904,6 +905,7 @@ class PaymentLifecycleSpec extends BaseRouterSpec {
904905
(UnreadableRemoteFailure(defaultAmountMsat, channelHopFromUpdate(a, b, update_ab) :: Nil, ByteVector.empty, Nil), Set.empty, Set.empty),
905906
(UnreadableRemoteFailure(defaultAmountMsat, channelHopFromUpdate(a, b, update_ab) :: channelHopFromUpdate(b, c, update_bc) :: channelHopFromUpdate(c, d, update_cd) :: Nil, ByteVector.empty, Nil), Set(c), Set.empty),
906907
(UnreadableRemoteFailure(defaultAmountMsat, channelHopFromUpdate(a, b, update_ab) :: channelHopFromUpdate(b, c, update_bc) :: channelHopFromUpdate(c, d, update_cd) :: channelHopFromUpdate(d, e, update_de) :: Nil, ByteVector.empty, Nil), Set(c, d), Set.empty),
908+
(UnreadableRemoteFailure(defaultAmountMsat, channelHopFromUpdate(a, b, update_ab) :: channelHopFromUpdate(b, c, update_bc) :: channelHopFromUpdate(c, d, update_cd) :: channelHopFromUpdate(d, e, update_de) :: Nil, ByteVector.empty, Seq(HoldTime(100 millis, b), HoldTime(90 millis, c), HoldTime(80 millis, d))), Set(d), Set.empty),
907909
(UnreadableRemoteFailure(defaultAmountMsat, channelHopFromUpdate(a, b, update_ab) :: channelHopFromUpdate(b, c, update_bc) :: channelHopFromUpdate(c, d, update_cd) :: NodeHop(d, e, CltvExpiryDelta(24), 0 msat) :: Nil, ByteVector.empty, Nil), Set(c), Set.empty),
908910
(UnreadableRemoteFailure(defaultAmountMsat, channelHopFromUpdate(a, b, update_ab) :: channelHopFromUpdate(b, c, update_bc) :: channelHopFromUpdate(c, d, update_cd) :: blindedHop_de :: Nil, ByteVector.empty, Nil), Set(c), Set.empty),
909911
)

0 commit comments

Comments
 (0)