From 4f19c7929d94a3ae7abae7f55d0f8af763dc15c2 Mon Sep 17 00:00:00 2001 From: Bastien Teinturier <31281497+t-bast@users.noreply.github.com> Date: Thu, 22 Feb 2024 10:27:03 +0100 Subject: [PATCH] Keep using 400 bytes trampoline payloads (#611) Eclair has support for variable size payloads, but it's not deployed on our node yet. --- .../kotlin/fr/acinq/lightning/payment/OutgoingPaymentPacket.kt | 2 +- .../fr/acinq/lightning/payment/PaymentPacketTestsCommon.kt | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/commonMain/kotlin/fr/acinq/lightning/payment/OutgoingPaymentPacket.kt b/src/commonMain/kotlin/fr/acinq/lightning/payment/OutgoingPaymentPacket.kt index ba9a3361c..2d4b857aa 100644 --- a/src/commonMain/kotlin/fr/acinq/lightning/payment/OutgoingPaymentPacket.kt +++ b/src/commonMain/kotlin/fr/acinq/lightning/payment/OutgoingPaymentPacket.kt @@ -85,7 +85,7 @@ object OutgoingPaymentPacket { Triple(amount + hop.fee(amount), expiry + hop.cltvExpiryDelta, listOf(payload) + payloads) } val nodes = hops.map { it.nextNodeId } - val onion = buildOnion(nodes, payloads, invoice.paymentHash, null) + val onion = buildOnion(nodes, payloads, invoice.paymentHash, 400) // TODO: remove the fixed payload length once eclair supports it return Triple(firstAmount, firstExpiry, onion) } diff --git a/src/commonTest/kotlin/fr/acinq/lightning/payment/PaymentPacketTestsCommon.kt b/src/commonTest/kotlin/fr/acinq/lightning/payment/PaymentPacketTestsCommon.kt index f907aa4cf..2fd74682d 100644 --- a/src/commonTest/kotlin/fr/acinq/lightning/payment/PaymentPacketTestsCommon.kt +++ b/src/commonTest/kotlin/fr/acinq/lightning/payment/PaymentPacketTestsCommon.kt @@ -365,8 +365,6 @@ class PaymentPacketTestsCommon : LightningTestSuite() { // .--. // / \ // a -> b -> c d -> e - - val features = Features(Feature.BasicMultiPartPayment to FeatureSupport.Optional) val offer = OfferTypes.Offer(finalAmount, "test offer", e, features, Block.LivenetGenesisBlock.hash) val payerKey = randomKey()