From 0b1dae47a3272dd293cbcfe89a064079e1aa1c5f Mon Sep 17 00:00:00 2001 From: t-bast Date: Tue, 23 Nov 2021 11:58:03 +0100 Subject: [PATCH] Add channel type feature bit We already support channel types, but we make it explicit with a feature bit as required by https://github.com/lightning/bolts/pull/906 --- eclair-core/src/main/resources/reference.conf | 1 + eclair-core/src/main/scala/fr/acinq/eclair/Features.scala | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/eclair-core/src/main/resources/reference.conf b/eclair-core/src/main/resources/reference.conf index fef81d4392..d899adc339 100644 --- a/eclair-core/src/main/resources/reference.conf +++ b/eclair-core/src/main/resources/reference.conf @@ -57,6 +57,7 @@ eclair { option_anchors_zero_fee_htlc_tx = disabled option_shutdown_anysegwit = optional option_onion_messages = disabled + option_channel_type = optional trampoline_payment = disabled keysend = disabled } diff --git a/eclair-core/src/main/scala/fr/acinq/eclair/Features.scala b/eclair-core/src/main/scala/fr/acinq/eclair/Features.scala index 4c392d5642..03b2316277 100644 --- a/eclair-core/src/main/scala/fr/acinq/eclair/Features.scala +++ b/eclair-core/src/main/scala/fr/acinq/eclair/Features.scala @@ -208,6 +208,11 @@ object Features { val mandatory = 38 } + case object ChannelType extends Feature { + val rfcName = "option_channel_type" + val mandatory = 44 + } + // TODO: @t-bast: update feature bits once spec-ed (currently reserved here: https://github.com/lightningnetwork/lightning-rfc/issues/605) // We're not advertising these bits yet in our announcements, clients have to assume support. // This is why we haven't added them yet to `areSupported`. @@ -231,12 +236,13 @@ object Features { PaymentSecret, BasicMultiPartPayment, Wumbo, - TrampolinePayment, StaticRemoteKey, AnchorOutputs, AnchorOutputsZeroFeeHtlcTx, ShutdownAnySegwit, OnionMessages, + ChannelType, + TrampolinePayment, KeySend )