45
45
//! and HTLC transactions are pre-signed with zero fee (see
46
46
//! [BOLT-3](https://github.com/lightning/bolts/blob/master/03-transactions.md) for more
47
47
//! information).
48
+ //! - `RouteBlinding` - requires/supports that a node can relay payments over blinded paths
49
+ //! (see [BOLT-4](https://github.com/lightning/bolts/blob/master/04-onion-routing.md#route-blinding) for more information).
48
50
//! - `ShutdownAnySegwit` - requires/supports that future segwit versions are allowed in `shutdown`
49
51
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md) for more information).
50
52
//! - `OnionMessages` - requires/supports forwarding onion messages
@@ -128,7 +130,7 @@ mod sealed {
128
130
// Byte 2
129
131
BasicMPP | Wumbo | AnchorsZeroFeeHtlcTx ,
130
132
// Byte 3
131
- ShutdownAnySegwit ,
133
+ RouteBlinding | ShutdownAnySegwit ,
132
134
// Byte 4
133
135
OnionMessages ,
134
136
// Byte 5
@@ -144,7 +146,7 @@ mod sealed {
144
146
// Byte 2
145
147
BasicMPP | Wumbo | AnchorsZeroFeeHtlcTx ,
146
148
// Byte 3
147
- ShutdownAnySegwit ,
149
+ RouteBlinding | ShutdownAnySegwit ,
148
150
// Byte 4
149
151
OnionMessages ,
150
152
// Byte 5
@@ -364,6 +366,9 @@ mod sealed {
364
366
define_feature ! ( 23 , AnchorsZeroFeeHtlcTx , [ InitContext , NodeContext , ChannelTypeContext ] ,
365
367
"Feature flags for `option_anchors_zero_fee_htlc_tx`." , set_anchors_zero_fee_htlc_tx_optional,
366
368
set_anchors_zero_fee_htlc_tx_required, supports_anchors_zero_fee_htlc_tx, requires_anchors_zero_fee_htlc_tx) ;
369
+ define_feature ! ( 25 , RouteBlinding , [ InitContext , NodeContext ] ,
370
+ "Feature flags for `option_route_blinding`." , set_route_blinding_optional,
371
+ set_route_blinding_required, supports_route_blinding, requires_route_blinding) ;
367
372
define_feature ! ( 27 , ShutdownAnySegwit , [ InitContext , NodeContext ] ,
368
373
"Feature flags for `opt_shutdown_anysegwit`." , set_shutdown_any_segwit_optional,
369
374
set_shutdown_any_segwit_required, supports_shutdown_anysegwit, requires_shutdown_anysegwit) ;
@@ -841,6 +846,7 @@ mod tests {
841
846
init_features. set_basic_mpp_optional ( ) ;
842
847
init_features. set_wumbo_optional ( ) ;
843
848
init_features. set_anchors_zero_fee_htlc_tx_optional ( ) ;
849
+ init_features. set_route_blinding_optional ( ) ;
844
850
init_features. set_shutdown_any_segwit_optional ( ) ;
845
851
init_features. set_onion_messages_optional ( ) ;
846
852
init_features. set_channel_type_optional ( ) ;
@@ -857,15 +863,15 @@ mod tests {
857
863
// - option_data_loss_protect
858
864
// - var_onion_optin (req) | static_remote_key (req) | payment_secret(req)
859
865
// - basic_mpp | wumbo | option_anchors_zero_fee_htlc_tx
860
- // - opt_shutdown_anysegwit
866
+ // - option_route_blinding | opt_shutdown_anysegwit
861
867
// - onion_messages
862
868
// - option_channel_type | option_scid_alias
863
869
// - option_zeroconf
864
870
assert_eq ! ( node_features. flags. len( ) , 7 ) ;
865
871
assert_eq ! ( node_features. flags[ 0 ] , 0b00000010 ) ;
866
872
assert_eq ! ( node_features. flags[ 1 ] , 0b01010001 ) ;
867
873
assert_eq ! ( node_features. flags[ 2 ] , 0b10001010 ) ;
868
- assert_eq ! ( node_features. flags[ 3 ] , 0b00001000 ) ;
874
+ assert_eq ! ( node_features. flags[ 3 ] , 0b00001010 ) ;
869
875
assert_eq ! ( node_features. flags[ 4 ] , 0b10000000 ) ;
870
876
assert_eq ! ( node_features. flags[ 5 ] , 0b10100000 ) ;
871
877
assert_eq ! ( node_features. flags[ 6 ] , 0b00001000 ) ;
0 commit comments