Move BogusHopData generation into test instead of OnionHopData.
[rust-lightning] / lightning / src / ln / msgs.rs
index 4518dd72203825b0addd36f9daee2d2d18e5729e..09636cef16019239c83061796fe6686abbed9b2b 100644 (file)
@@ -614,11 +614,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 {
@@ -968,8 +963,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)?;