Skip to content

Commit

Permalink
Add channel type feature bit
Browse files Browse the repository at this point in the history
We already support channel types, but we make it explicit with a feature
bit as required by lightning/bolts#906
  • Loading branch information
t-bast committed Nov 23, 2021
1 parent 6cc37cb commit 7755e59
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions eclair-core/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
8 changes: 7 additions & 1 deletion eclair-core/src/main/scala/fr/acinq/eclair/Features.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -231,12 +236,13 @@ object Features {
PaymentSecret,
BasicMultiPartPayment,
Wumbo,
TrampolinePayment,
StaticRemoteKey,
AnchorOutputs,
AnchorOutputsZeroFeeHtlcTx,
ShutdownAnySegwit,
OnionMessages,
ChannelType,
TrampolinePayment,
KeySend
)

Expand Down

0 comments on commit 7755e59

Please sign in to comment.