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
@@ -143,7 +145,7 @@ mod sealed {
143
145
// Byte 2
144
146
BasicMPP | Wumbo | AnchorsNonzeroFeeHtlcTx | AnchorsZeroFeeHtlcTx ,
145
147
// Byte 3
146
- ShutdownAnySegwit ,
148
+ RouteBlinding | ShutdownAnySegwit ,
147
149
// Byte 4
148
150
OnionMessages ,
149
151
// Byte 5
@@ -159,7 +161,7 @@ mod sealed {
159
161
// Byte 2
160
162
BasicMPP | Wumbo | AnchorsNonzeroFeeHtlcTx | AnchorsZeroFeeHtlcTx ,
161
163
// Byte 3
162
- ShutdownAnySegwit ,
164
+ RouteBlinding | ShutdownAnySegwit ,
163
165
// Byte 4
164
166
OnionMessages ,
165
167
// Byte 5
@@ -391,6 +393,9 @@ mod sealed {
391
393
define_feature ! ( 23 , AnchorsZeroFeeHtlcTx , [ InitContext , NodeContext , ChannelTypeContext ] ,
392
394
"Feature flags for `option_anchors_zero_fee_htlc_tx`." , set_anchors_zero_fee_htlc_tx_optional,
393
395
set_anchors_zero_fee_htlc_tx_required, supports_anchors_zero_fee_htlc_tx, requires_anchors_zero_fee_htlc_tx) ;
396
+ define_feature ! ( 25 , RouteBlinding , [ InitContext , NodeContext ] ,
397
+ "Feature flags for `option_route_blinding`." , set_route_blinding_optional,
398
+ set_route_blinding_required, supports_route_blinding, requires_route_blinding) ;
394
399
define_feature ! ( 27 , ShutdownAnySegwit , [ InitContext , NodeContext ] ,
395
400
"Feature flags for `opt_shutdown_anysegwit`." , set_shutdown_any_segwit_optional,
396
401
set_shutdown_any_segwit_required, supports_shutdown_anysegwit, requires_shutdown_anysegwit) ;
@@ -1014,6 +1019,7 @@ mod tests {
1014
1019
init_features. set_basic_mpp_optional ( ) ;
1015
1020
init_features. set_wumbo_optional ( ) ;
1016
1021
init_features. set_anchors_zero_fee_htlc_tx_optional ( ) ;
1022
+ init_features. set_route_blinding_optional ( ) ;
1017
1023
init_features. set_shutdown_any_segwit_optional ( ) ;
1018
1024
init_features. set_onion_messages_optional ( ) ;
1019
1025
init_features. set_channel_type_optional ( ) ;
@@ -1030,15 +1036,15 @@ mod tests {
1030
1036
// - option_data_loss_protect (req)
1031
1037
// - var_onion_optin (req) | static_remote_key (req) | payment_secret(req)
1032
1038
// - basic_mpp | wumbo | option_anchors_zero_fee_htlc_tx
1033
- // - opt_shutdown_anysegwit
1039
+ // - option_route_blinding | opt_shutdown_anysegwit
1034
1040
// - onion_messages
1035
1041
// - option_channel_type | option_scid_alias
1036
1042
// - option_zeroconf
1037
1043
assert_eq ! ( node_features. flags. len( ) , 7 ) ;
1038
1044
assert_eq ! ( node_features. flags[ 0 ] , 0b00000001 ) ;
1039
1045
assert_eq ! ( node_features. flags[ 1 ] , 0b01010001 ) ;
1040
1046
assert_eq ! ( node_features. flags[ 2 ] , 0b10001010 ) ;
1041
- assert_eq ! ( node_features. flags[ 3 ] , 0b00001000 ) ;
1047
+ assert_eq ! ( node_features. flags[ 3 ] , 0b00001010 ) ;
1042
1048
assert_eq ! ( node_features. flags[ 4 ] , 0b10000000 ) ;
1043
1049
assert_eq ! ( node_features. flags[ 5 ] , 0b10100000 ) ;
1044
1050
assert_eq ! ( node_features. flags[ 6 ] , 0b00001000 ) ;
0 commit comments