// Byte 0
DataLossProtect | InitialRoutingSync | UpfrontShutdownScript,
// Byte 1
- VariableLengthOnion | StaticRemoteKey | PaymentSecret,
+ VariableLengthOnion | PaymentSecret,
// Byte 2
BasicMPP,
],
// Byte 0
DataLossProtect | UpfrontShutdownScript,
// Byte 1
- VariableLengthOnion | StaticRemoteKey | PaymentSecret,
+ VariableLengthOnion | PaymentSecret,
// Byte 2
BasicMPP,
],
pub(crate) fn supports_static_remote_key(&self) -> bool {
<T as sealed::StaticRemoteKey>::supports_feature(&self.flags)
}
+ #[cfg(test)]
+ pub(crate) fn requires_static_remote_key(&self) -> bool {
+ <T as sealed::StaticRemoteKey>::requires_feature(&self.flags)
+ }
}
impl<T: sealed::InitialRoutingSync> Features<T> {
assert!(!InitFeatures::known().requires_variable_length_onion());
assert!(!NodeFeatures::known().requires_variable_length_onion());
+ assert!(!InitFeatures::known().supports_static_remote_key());
+ assert!(!NodeFeatures::known().supports_static_remote_key());
+ assert!(!InitFeatures::known().requires_static_remote_key());
+ assert!(!NodeFeatures::known().requires_static_remote_key());
+
assert!(InitFeatures::known().supports_payment_secret());
assert!(NodeFeatures::known().supports_payment_secret());
assert!(!InitFeatures::known().requires_payment_secret());
{
// Check that the flags are as expected:
// - option_data_loss_protect
- // - var_onion_optin | static_remote_key | payment_secret
+ // - var_onion_optin | payment_secret
// - basic_mpp
assert_eq!(node_features.flags.len(), 3);
assert_eq!(node_features.flags[0], 0b00000010);
- assert_eq!(node_features.flags[1], 0b10100010);
+ assert_eq!(node_features.flags[1], 0b10000010);
assert_eq!(node_features.flags[2], 0b00000010);
}