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
@@ -136,7 +138,7 @@ mod sealed {
136
138
// Byte 2
137
139
BasicMPP | Wumbo | AnchorsZeroFeeHtlcTx ,
138
140
// Byte 3
139
- ShutdownAnySegwit ,
141
+ RouteBlinding | ShutdownAnySegwit ,
140
142
// Byte 4
141
143
OnionMessages ,
142
144
// Byte 5
@@ -152,7 +154,7 @@ mod sealed {
152
154
// Byte 2
153
155
BasicMPP | Wumbo | AnchorsZeroFeeHtlcTx ,
154
156
// Byte 3
155
- ShutdownAnySegwit ,
157
+ RouteBlinding | ShutdownAnySegwit ,
156
158
// Byte 4
157
159
OnionMessages ,
158
160
// Byte 5
@@ -381,6 +383,9 @@ mod sealed {
381
383
define_feature ! ( 23 , AnchorsZeroFeeHtlcTx , [ InitContext , NodeContext , ChannelTypeContext ] ,
382
384
"Feature flags for `option_anchors_zero_fee_htlc_tx`." , set_anchors_zero_fee_htlc_tx_optional,
383
385
set_anchors_zero_fee_htlc_tx_required, supports_anchors_zero_fee_htlc_tx, requires_anchors_zero_fee_htlc_tx) ;
386
+ define_feature ! ( 25 , RouteBlinding , [ InitContext , NodeContext ] ,
387
+ "Feature flags for `option_route_blinding`." , set_route_blinding_optional,
388
+ set_route_blinding_required, supports_route_blinding, requires_route_blinding) ;
384
389
define_feature ! ( 27 , ShutdownAnySegwit , [ InitContext , NodeContext ] ,
385
390
"Feature flags for `opt_shutdown_anysegwit`." , set_shutdown_any_segwit_optional,
386
391
set_shutdown_any_segwit_required, supports_shutdown_anysegwit, requires_shutdown_anysegwit) ;
@@ -882,6 +887,7 @@ mod tests {
882
887
init_features. set_basic_mpp_optional ( ) ;
883
888
init_features. set_wumbo_optional ( ) ;
884
889
init_features. set_anchors_zero_fee_htlc_tx_optional ( ) ;
890
+ init_features. set_route_blinding_optional ( ) ;
885
891
init_features. set_shutdown_any_segwit_optional ( ) ;
886
892
init_features. set_onion_messages_optional ( ) ;
887
893
init_features. set_channel_type_optional ( ) ;
@@ -898,15 +904,15 @@ mod tests {
898
904
// - option_data_loss_protect (req)
899
905
// - var_onion_optin (req) | static_remote_key (req) | payment_secret(req)
900
906
// - basic_mpp | wumbo | option_anchors_zero_fee_htlc_tx
901
- // - opt_shutdown_anysegwit
907
+ // - option_route_blinding | opt_shutdown_anysegwit
902
908
// - onion_messages
903
909
// - option_channel_type | option_scid_alias
904
910
// - option_zeroconf
905
911
assert_eq ! ( node_features. flags. len( ) , 7 ) ;
906
912
assert_eq ! ( node_features. flags[ 0 ] , 0b00000001 ) ;
907
913
assert_eq ! ( node_features. flags[ 1 ] , 0b01010001 ) ;
908
914
assert_eq ! ( node_features. flags[ 2 ] , 0b10001010 ) ;
909
- assert_eq ! ( node_features. flags[ 3 ] , 0b00001000 ) ;
915
+ assert_eq ! ( node_features. flags[ 3 ] , 0b00001010 ) ;
910
916
assert_eq ! ( node_features. flags[ 4 ] , 0b10000000 ) ;
911
917
assert_eq ! ( node_features. flags[ 5 ] , 0b10100000 ) ;
912
918
assert_eq ! ( node_features. flags[ 6 ] , 0b00001000 ) ;
0 commit comments