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 and HTLC transactions have zero fee
56
+ //! (see [BOLT-3](https://github.com/lightning/bolts/blob/master/03-transactions.md) for more information).
55
57
//!
56
58
//! [BOLT #9]: https://github.com/lightning/bolts/blob/master/09-features.md
57
59
//! [messages]: crate::ln::msgs
@@ -122,7 +124,7 @@ mod sealed {
122
124
// Byte 1
123
125
VariableLengthOnion | StaticRemoteKey | PaymentSecret ,
124
126
// Byte 2
125
- BasicMPP | Wumbo ,
127
+ BasicMPP | Wumbo | AnchorsZeroFeeHtlcTx ,
126
128
// Byte 3
127
129
ShutdownAnySegwit ,
128
130
// Byte 4
@@ -138,7 +140,7 @@ mod sealed {
138
140
// Byte 1
139
141
VariableLengthOnion | StaticRemoteKey | PaymentSecret ,
140
142
// Byte 2
141
- BasicMPP | Wumbo ,
143
+ BasicMPP | Wumbo | AnchorsZeroFeeHtlcTx ,
142
144
// Byte 3
143
145
ShutdownAnySegwit ,
144
146
// Byte 4
@@ -165,7 +167,7 @@ mod sealed {
165
167
// Byte 1
166
168
StaticRemoteKey ,
167
169
// Byte 2
168
- ,
170
+ AnchorsZeroFeeHtlcTx ,
169
171
// Byte 3
170
172
,
171
173
// Byte 4
@@ -346,6 +348,9 @@ mod sealed {
346
348
define_feature ! ( 19 , Wumbo , [ InitContext , NodeContext ] ,
347
349
"Feature flags for `option_support_large_channel` (aka wumbo channels)." , set_wumbo_optional, set_wumbo_required,
348
350
supports_wumbo, requires_wumbo) ;
351
+ define_feature ! ( 23 , AnchorsZeroFeeHtlcTx , [ InitContext , NodeContext , ChannelTypeContext ] ,
352
+ "Feature flags for `option_anchors_zero_fee_htlc_tx`." , set_anchors_zero_fee_htlc_tx_optional,
353
+ set_anchors_zero_fee_htlc_tx_required, supports_anchors_zero_fee_htlc_tx, requires_anchors_zero_fee_htlc_tx) ;
349
354
define_feature ! ( 27 , ShutdownAnySegwit , [ InitContext , NodeContext ] ,
350
355
"Feature flags for `opt_shutdown_anysegwit`." , set_shutdown_any_segwit_optional,
351
356
set_shutdown_any_segwit_required, supports_shutdown_anysegwit, requires_shutdown_anysegwit) ;
@@ -776,7 +781,7 @@ mod tests {
776
781
assert_eq ! ( node_features. flags. len( ) , 7 ) ;
777
782
assert_eq ! ( node_features. flags[ 0 ] , 0b00000010 ) ;
778
783
assert_eq ! ( node_features. flags[ 1 ] , 0b01010001 ) ;
779
- assert_eq ! ( node_features. flags[ 2 ] , 0b00001010 ) ;
784
+ assert_eq ! ( node_features. flags[ 2 ] , 0b10001010 ) ;
780
785
assert_eq ! ( node_features. flags[ 3 ] , 0b00001000 ) ;
781
786
assert_eq ! ( node_features. flags[ 4 ] , 0b10000000 ) ;
782
787
assert_eq ! ( node_features. flags[ 5 ] , 0b10100000 ) ;
0 commit comments