@@ -92,7 +92,7 @@ mod sealed {
92
92
// Byte 0
93
93
,
94
94
// Byte 1
95
- StaticRemoteKey ,
95
+ StaticRemoteKey | PaymentSecret ,
96
96
// Byte 2
97
97
,
98
98
// Byte 3
@@ -102,7 +102,7 @@ mod sealed {
102
102
// Byte 0
103
103
DataLossProtect | InitialRoutingSync | UpfrontShutdownScript | GossipQueries ,
104
104
// Byte 1
105
- VariableLengthOnion | PaymentSecret ,
105
+ VariableLengthOnion ,
106
106
// Byte 2
107
107
BasicMPP ,
108
108
// Byte 3
@@ -114,7 +114,7 @@ mod sealed {
114
114
// Byte 0
115
115
,
116
116
// Byte 1
117
- StaticRemoteKey ,
117
+ StaticRemoteKey | PaymentSecret ,
118
118
// Byte 2
119
119
,
120
120
// Byte 3
@@ -124,7 +124,7 @@ mod sealed {
124
124
// Byte 0
125
125
DataLossProtect | UpfrontShutdownScript | GossipQueries ,
126
126
// Byte 1
127
- VariableLengthOnion | PaymentSecret ,
127
+ VariableLengthOnion ,
128
128
// Byte 2
129
129
BasicMPP ,
130
130
// Byte 3
@@ -136,12 +136,19 @@ mod sealed {
136
136
optional_features: [ ] ,
137
137
} ) ;
138
138
define_context ! ( InvoiceContext {
139
- required_features: [ , , , ] ,
139
+ required_features: [
140
+ // Byte 0
141
+ ,
142
+ // Byte 1
143
+ PaymentSecret ,
144
+ // Byte 2
145
+ ,
146
+ ] ,
140
147
optional_features: [
141
148
// Byte 0
142
149
,
143
150
// Byte 1
144
- VariableLengthOnion | PaymentSecret ,
151
+ VariableLengthOnion ,
145
152
// Byte 2
146
153
BasicMPP ,
147
154
] ,
@@ -665,8 +672,8 @@ mod tests {
665
672
666
673
assert ! ( InitFeatures :: known( ) . supports_payment_secret( ) ) ;
667
674
assert ! ( NodeFeatures :: known( ) . supports_payment_secret( ) ) ;
668
- assert ! ( ! InitFeatures :: known( ) . requires_payment_secret( ) ) ;
669
- assert ! ( ! NodeFeatures :: known( ) . requires_payment_secret( ) ) ;
675
+ assert ! ( InitFeatures :: known( ) . requires_payment_secret( ) ) ;
676
+ assert ! ( NodeFeatures :: known( ) . requires_payment_secret( ) ) ;
670
677
671
678
assert ! ( InitFeatures :: known( ) . supports_basic_mpp( ) ) ;
672
679
assert ! ( NodeFeatures :: known( ) . supports_basic_mpp( ) ) ;
@@ -712,12 +719,12 @@ mod tests {
712
719
{
713
720
// Check that the flags are as expected:
714
721
// - option_data_loss_protect
715
- // - var_onion_optin | static_remote_key (req) | payment_secret
722
+ // - var_onion_optin | static_remote_key (req) | payment_secret(req)
716
723
// - basic_mpp
717
724
// - opt_shutdown_anysegwit
718
725
assert_eq ! ( node_features. flags. len( ) , 4 ) ;
719
726
assert_eq ! ( node_features. flags[ 0 ] , 0b00000010 ) ;
720
- assert_eq ! ( node_features. flags[ 1 ] , 0b10010010 ) ;
727
+ assert_eq ! ( node_features. flags[ 1 ] , 0b01010010 ) ;
721
728
assert_eq ! ( node_features. flags[ 2 ] , 0b00000010 ) ;
722
729
assert_eq ! ( node_features. flags[ 3 ] , 0b00001000 ) ;
723
730
}
0 commit comments