Pull hmac out of OnionHopData.
[rust-lightning] / lightning / src / ln / msgs.rs
index 9d1563d644711b9e61a67e0797d75f3183485b93..4518dd72203825b0addd36f9daee2d2d18e5729e 100644 (file)
@@ -627,7 +627,6 @@ mod fuzzy_internal_msgs {
                pub(crate) amt_to_forward: u64,
                pub(crate) outgoing_cltv_value: u32,
                // 12 bytes of 0-padding
-               pub(crate) hmac: [u8; 32],
        }
 
        pub struct DecodedOnionErrorPacket {
@@ -966,7 +965,7 @@ impl_writeable!(UpdateAddHTLC, 32+8+8+32+4+1366, {
 
 impl Writeable for OnionHopData {
        fn write<W: Writer>(&self, w: &mut W) -> Result<(), ::std::io::Error> {
-               w.size_hint(65);
+               w.size_hint(33);
                match self.format {
                        OnionHopDataFormat::Legacy => 0u8.write(w)?,
                        #[cfg(test)]
@@ -976,7 +975,6 @@ impl Writeable for OnionHopData {
                self.amt_to_forward.write(w)?;
                self.outgoing_cltv_value.write(w)?;
                w.write_all(&[0;12])?;
-               self.hmac.write(w)?;
                Ok(())
        }
 }
@@ -998,7 +996,6 @@ impl<R: Read> Readable<R> for OnionHopData {
                                r.read_exact(&mut [0; 12])?;
                                v
                        },
-                       hmac: Readable::read(r)?,
                })
        }
 }