52
52
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md) for more information).
53
53
//! - `Keysend` - send funds to a node without an invoice
54
54
//! (see the [`Keysend` feature assignment proposal](https://github.com/lightning/bolts/issues/605#issuecomment-606679798) for more information).
55
+ //! - `AnchorsZeroFeeHtlcTx` - requires/supports that commitment transactions include anchor outputs
56
+ //! and HTLC transactions are pre-signed with zero fee (see
57
+ //! [BOLT-3](https://github.com/lightning/bolts/blob/master/03-transactions.md) for more
58
+ //! information).
55
59
//!
56
60
//! [BOLT #9]: https://github.com/lightning/bolts/blob/master/09-features.md
57
61
//! [messages]: crate::ln::msgs
@@ -122,7 +126,7 @@ mod sealed {
122
126
// Byte 1
123
127
VariableLengthOnion | StaticRemoteKey | PaymentSecret ,
124
128
// Byte 2
125
- BasicMPP | Wumbo ,
129
+ BasicMPP | Wumbo | AnchorsZeroFeeHtlcTx ,
126
130
// Byte 3
127
131
ShutdownAnySegwit ,
128
132
// Byte 4
@@ -138,7 +142,7 @@ mod sealed {
138
142
// Byte 1
139
143
VariableLengthOnion | StaticRemoteKey | PaymentSecret ,
140
144
// Byte 2
141
- BasicMPP | Wumbo ,
145
+ BasicMPP | Wumbo | AnchorsZeroFeeHtlcTx ,
142
146
// Byte 3
143
147
ShutdownAnySegwit ,
144
148
// Byte 4
@@ -167,7 +171,7 @@ mod sealed {
167
171
// Byte 1
168
172
StaticRemoteKey ,
169
173
// Byte 2
170
- ,
174
+ AnchorsZeroFeeHtlcTx ,
171
175
// Byte 3
172
176
,
173
177
// Byte 4
@@ -348,6 +352,9 @@ mod sealed {
348
352
define_feature ! ( 19 , Wumbo , [ InitContext , NodeContext ] ,
349
353
"Feature flags for `option_support_large_channel` (aka wumbo channels)." , set_wumbo_optional, set_wumbo_required,
350
354
supports_wumbo, requires_wumbo) ;
355
+ define_feature ! ( 23 , AnchorsZeroFeeHtlcTx , [ InitContext , NodeContext , ChannelTypeContext ] ,
356
+ "Feature flags for `option_anchors_zero_fee_htlc_tx`." , set_anchors_zero_fee_htlc_tx_optional,
357
+ set_anchors_zero_fee_htlc_tx_required, supports_anchors_zero_fee_htlc_tx, requires_anchors_zero_fee_htlc_tx) ;
351
358
define_feature ! ( 27 , ShutdownAnySegwit , [ InitContext , NodeContext ] ,
352
359
"Feature flags for `opt_shutdown_anysegwit`." , set_shutdown_any_segwit_optional,
353
360
set_shutdown_any_segwit_required, supports_shutdown_anysegwit, requires_shutdown_anysegwit) ;
@@ -798,7 +805,7 @@ mod tests {
798
805
assert_eq ! ( node_features. flags. len( ) , 7 ) ;
799
806
assert_eq ! ( node_features. flags[ 0 ] , 0b00000010 ) ;
800
807
assert_eq ! ( node_features. flags[ 1 ] , 0b01010001 ) ;
801
- assert_eq ! ( node_features. flags[ 2 ] , 0b00001010 ) ;
808
+ assert_eq ! ( node_features. flags[ 2 ] , 0b10001010 ) ;
802
809
assert_eq ! ( node_features. flags[ 3 ] , 0b00001000 ) ;
803
810
assert_eq ! ( node_features. flags[ 4 ] , 0b10000000 ) ;
804
811
assert_eq ! ( node_features. flags[ 5 ] , 0b10100000 ) ;
0 commit comments