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 {
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)]
self.amt_to_forward.write(w)?;
self.outgoing_cltv_value.write(w)?;
w.write_all(&[0;12])?;
- self.hmac.write(w)?;
Ok(())
}
}
r.read_exact(&mut [0; 12])?;
v
},
- hmac: Readable::read(r)?,
})
}
}