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
@@ -176,7 +180,7 @@ mod sealed {
176
180
// Byte 1
177
181
StaticRemoteKey ,
178
182
// Byte 2
179
- ,
183
+ AnchorsZeroFeeHtlcTx ,
180
184
// Byte 3
181
185
,
182
186
// Byte 4
@@ -357,6 +361,9 @@ mod sealed {
357
361
define_feature ! ( 19 , Wumbo , [ InitContext , NodeContext ] ,
358
362
"Feature flags for `option_support_large_channel` (aka wumbo channels)." , set_wumbo_optional, set_wumbo_required,
359
363
supports_wumbo, requires_wumbo) ;
364
+ define_feature ! ( 23 , AnchorsZeroFeeHtlcTx , [ InitContext , NodeContext , ChannelTypeContext ] ,
365
+ "Feature flags for `option_anchors_zero_fee_htlc_tx`." , set_anchors_zero_fee_htlc_tx_optional,
366
+ set_anchors_zero_fee_htlc_tx_required, supports_anchors_zero_fee_htlc_tx, requires_anchors_zero_fee_htlc_tx) ;
360
367
define_feature ! ( 27 , ShutdownAnySegwit , [ InitContext , NodeContext ] ,
361
368
"Feature flags for `opt_shutdown_anysegwit`." , set_shutdown_any_segwit_optional,
362
369
set_shutdown_any_segwit_required, supports_shutdown_anysegwit, requires_shutdown_anysegwit) ;
@@ -826,7 +833,7 @@ mod tests {
826
833
assert_eq ! ( node_features. flags. len( ) , 7 ) ;
827
834
assert_eq ! ( node_features. flags[ 0 ] , 0b00000010 ) ;
828
835
assert_eq ! ( node_features. flags[ 1 ] , 0b01010001 ) ;
829
- assert_eq ! ( node_features. flags[ 2 ] , 0b00001010 ) ;
836
+ assert_eq ! ( node_features. flags[ 2 ] , 0b10001010 ) ;
830
837
assert_eq ! ( node_features. flags[ 3 ] , 0b00001000 ) ;
831
838
assert_eq ! ( node_features. flags[ 4 ] , 0b10000000 ) ;
832
839
assert_eq ! ( node_features. flags[ 5 ] , 0b10100000 ) ;
0 commit comments