Skip to content

Commit 8b34ea2

Browse files
committed
Add feature flags for option_zero_fee_commitments
1 parent 49dbeea commit 8b34ea2

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

lightning-types/src/features.rs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@
7676
//! (see [BOLT PR #1110](https://github.com/lightning/bolts/pull/1110) for more info).
7777
//! - `Quiescence` - protocol to quiesce a channel by indicating that "SomeThing Fundamental is Underway"
7878
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#channel-quiescence) for more information).
79+
//! - `ZeroFeeCommitments` - A channel type which always uses zero transaction fee on commitment transactions.
80+
//! (see [BOLT PR #1228](https://github.com/lightning/bolts/pull/1228) for more info).
7981
//!
8082
//! LDK knows about the following features, but does not support them:
8183
//! - `AnchorsNonzeroFeeHtlcTx` - the initial version of anchor outputs, which was later found to be
@@ -156,7 +158,7 @@ mod sealed {
156158
// Byte 4
157159
Quiescence | OnionMessages,
158160
// Byte 5
159-
ProvideStorage | ChannelType | SCIDPrivacy,
161+
ProvideStorage | ChannelType | SCIDPrivacy | AnchorZeroFeeCommitments,
160162
// Byte 6
161163
ZeroConf,
162164
// Byte 7
@@ -177,7 +179,7 @@ mod sealed {
177179
// Byte 4
178180
Quiescence | OnionMessages,
179181
// Byte 5
180-
ProvideStorage | ChannelType | SCIDPrivacy,
182+
ProvideStorage | ChannelType | SCIDPrivacy | AnchorZeroFeeCommitments,
181183
// Byte 6
182184
ZeroConf | Keysend,
183185
// Byte 7
@@ -242,7 +244,7 @@ mod sealed {
242244
// Byte 4
243245
,
244246
// Byte 5
245-
SCIDPrivacy,
247+
SCIDPrivacy | AnchorZeroFeeCommitments,
246248
// Byte 6
247249
ZeroConf,
248250
]);
@@ -580,6 +582,17 @@ mod sealed {
580582
supports_onion_messages,
581583
requires_onion_messages
582584
);
585+
define_feature!(
586+
41,
587+
AnchorZeroFeeCommitments,
588+
[InitContext, NodeContext, ChannelTypeContext],
589+
"Feature flags for `option_zero_fee_commitments`.",
590+
set_anchor_zero_fee_commitments_optional,
591+
set_anchor_zero_fee_commitments_required,
592+
clear_anchor_zero_fee_commitments,
593+
supports_anchor_zero_fee_commitments,
594+
requires_anchor_zero_fee_commitments
595+
);
583596
define_feature!(
584597
43,
585598
ProvideStorage,

0 commit comments

Comments
 (0)