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) ;
@@ -990,6 +995,7 @@ mod tests {
990
995
init_features. set_basic_mpp_optional ( ) ;
991
996
init_features. set_wumbo_optional ( ) ;
992
997
init_features. set_anchors_zero_fee_htlc_tx_optional ( ) ;
998
+ init_features. set_route_blinding_optional ( ) ;
993
999
init_features. set_shutdown_any_segwit_optional ( ) ;
994
1000
init_features. set_onion_messages_optional ( ) ;
995
1001
init_features. set_channel_type_optional ( ) ;
@@ -1006,15 +1012,15 @@ mod tests {
1006
1012
// - option_data_loss_protect (req)
1007
1013
// - var_onion_optin (req) | static_remote_key (req) | payment_secret(req)
1008
1014
// - basic_mpp | wumbo | option_anchors_zero_fee_htlc_tx
1009
- // - opt_shutdown_anysegwit
1015
+ // - option_route_blinding | opt_shutdown_anysegwit
1010
1016
// - onion_messages
1011
1017
// - option_channel_type | option_scid_alias
1012
1018
// - option_zeroconf
1013
1019
assert_eq ! ( node_features. flags. len( ) , 7 ) ;
1014
1020
assert_eq ! ( node_features. flags[ 0 ] , 0b00000001 ) ;
1015
1021
assert_eq ! ( node_features. flags[ 1 ] , 0b01010001 ) ;
1016
1022
assert_eq ! ( node_features. flags[ 2 ] , 0b10001010 ) ;
1017
- assert_eq ! ( node_features. flags[ 3 ] , 0b00001000 ) ;
1023
+ assert_eq ! ( node_features. flags[ 3 ] , 0b00001010 ) ;
1018
1024
assert_eq ! ( node_features. flags[ 4 ] , 0b10000000 ) ;
1019
1025
assert_eq ! ( node_features. flags[ 5 ] , 0b10100000 ) ;
1020
1026
assert_eq ! ( node_features. flags[ 6 ] , 0b00001000 ) ;
0 commit comments