File tree 1 file changed +8
-2
lines changed 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -299,15 +299,15 @@ impl<T: sealed::PaymentSecret> Features<T> {
299
299
// Note that we never need to test this since what really matters is the invoice - iff the
300
300
// invoice provides a payment_secret, we assume that we can use it (ie that the recipient
301
301
// supports payment_secret).
302
- pub ( crate ) fn payment_secret ( & self ) -> bool {
302
+ pub ( crate ) fn supports_payment_secret ( & self ) -> bool {
303
303
self . flags . len ( ) > 1 && ( self . flags [ 1 ] & ( 3 << ( 14 -8 ) ) ) != 0
304
304
}
305
305
}
306
306
307
307
impl < T : sealed:: BasicMPP > Features < T > {
308
308
// We currently never test for this since we don't actually *generate* multipath routes.
309
309
#[ allow( dead_code) ]
310
- pub ( crate ) fn basic_mpp ( & self ) -> bool {
310
+ pub ( crate ) fn supports_basic_mpp ( & self ) -> bool {
311
311
self . flags . len ( ) > 2 && ( self . flags [ 2 ] & ( 3 << ( 16 -8 * 2 ) ) ) != 0
312
312
}
313
313
}
@@ -356,6 +356,12 @@ mod tests {
356
356
assert ! ( InitFeatures :: supported( ) . supports_variable_length_onion( ) ) ;
357
357
assert ! ( NodeFeatures :: supported( ) . supports_variable_length_onion( ) ) ;
358
358
359
+ assert ! ( InitFeatures :: supported( ) . supports_payment_secret( ) ) ;
360
+ assert ! ( NodeFeatures :: supported( ) . supports_payment_secret( ) ) ;
361
+
362
+ assert ! ( InitFeatures :: supported( ) . supports_basic_mpp( ) ) ;
363
+ assert ! ( NodeFeatures :: supported( ) . supports_basic_mpp( ) ) ;
364
+
359
365
let mut init_features = InitFeatures :: supported ( ) ;
360
366
init_features. set_initial_routing_sync ( ) ;
361
367
assert ! ( !init_features. requires_unknown_bits( ) ) ;
You can’t perform that action at this time.
0 commit comments