@@ -97,7 +97,7 @@ mod sealed {
97
97
// Byte 0
98
98
DataLossProtect | InitialRoutingSync | UpfrontShutdownScript ,
99
99
// Byte 1
100
- VariableLengthOnion | StaticRemoteKey | PaymentSecret ,
100
+ VariableLengthOnion | PaymentSecret ,
101
101
// Byte 2
102
102
BasicMPP ,
103
103
] ,
@@ -115,7 +115,7 @@ mod sealed {
115
115
// Byte 0
116
116
DataLossProtect | UpfrontShutdownScript ,
117
117
// Byte 1
118
- VariableLengthOnion | StaticRemoteKey | PaymentSecret ,
118
+ VariableLengthOnion | PaymentSecret ,
119
119
// Byte 2
120
120
BasicMPP ,
121
121
] ,
@@ -476,6 +476,10 @@ impl<T: sealed::StaticRemoteKey> Features<T> {
476
476
pub ( crate ) fn supports_static_remote_key ( & self ) -> bool {
477
477
<T as sealed:: StaticRemoteKey >:: supports_feature ( & self . flags )
478
478
}
479
+ #[ cfg( test) ]
480
+ pub ( crate ) fn requires_static_remote_key ( & self ) -> bool {
481
+ <T as sealed:: StaticRemoteKey >:: requires_feature ( & self . flags )
482
+ }
479
483
}
480
484
481
485
impl < T : sealed:: InitialRoutingSync > Features < T > {
@@ -563,6 +567,11 @@ mod tests {
563
567
assert ! ( !InitFeatures :: known( ) . requires_variable_length_onion( ) ) ;
564
568
assert ! ( !NodeFeatures :: known( ) . requires_variable_length_onion( ) ) ;
565
569
570
+ assert ! ( !InitFeatures :: known( ) . supports_static_remote_key( ) ) ;
571
+ assert ! ( !NodeFeatures :: known( ) . supports_static_remote_key( ) ) ;
572
+ assert ! ( !InitFeatures :: known( ) . requires_static_remote_key( ) ) ;
573
+ assert ! ( !NodeFeatures :: known( ) . requires_static_remote_key( ) ) ;
574
+
566
575
assert ! ( InitFeatures :: known( ) . supports_payment_secret( ) ) ;
567
576
assert ! ( NodeFeatures :: known( ) . supports_payment_secret( ) ) ;
568
577
assert ! ( !InitFeatures :: known( ) . requires_payment_secret( ) ) ;
@@ -608,11 +617,11 @@ mod tests {
608
617
{
609
618
// Check that the flags are as expected:
610
619
// - option_data_loss_protect
611
- // - var_onion_optin | static_remote_key | payment_secret
620
+ // - var_onion_optin | payment_secret
612
621
// - basic_mpp
613
622
assert_eq ! ( node_features. flags. len( ) , 3 ) ;
614
623
assert_eq ! ( node_features. flags[ 0 ] , 0b00000010 ) ;
615
- assert_eq ! ( node_features. flags[ 1 ] , 0b10100010 ) ;
624
+ assert_eq ! ( node_features. flags[ 1 ] , 0b10000010 ) ;
616
625
assert_eq ! ( node_features. flags[ 2 ] , 0b00000010 ) ;
617
626
}
618
627
0 commit comments