Move BogusHopData generation into test instead of OnionHopData.
[rust-lightning] / lightning / src / ln / msgs.rs
index b42efcd5f785c33630af8d22a142687d2fbd4707..ec2c98cb93cdd0b6733937a176868624ee05c162 100644 (file)
@@ -612,11 +612,6 @@ mod fuzzy_internal_msgs {
 
        pub(crate) enum OnionHopDataFormat {
                Legacy, // aka Realm-0
-               // Some tests expect to be able to generate bogus non-deserializable OnionHopDatas. In the
-               // future we can use bogus TLV attributes, but for now we have to expose a "bogus realm"
-               // option.
-               #[cfg(test)]
-               BogusRealm(u8),
        }
 
        pub struct OnionHopData {
@@ -966,8 +961,6 @@ impl Writeable for OnionHopData {
                w.size_hint(33);
                match self.format {
                        OnionHopDataFormat::Legacy => 0u8.write(w)?,
-                       #[cfg(test)]
-                       OnionHopDataFormat::BogusRealm(v) => v.write(w)?,
                }
                self.short_channel_id.write(w)?;
                self.amt_to_forward.write(w)?;