Merge pull request #1810 from TheBlueMatt/2022-10-112-bindings-base
[rust-lightning] / lightning / src / ln / msgs.rs
index 5833933951100a461b4ba6d38b0aa1ed25758111..f6bfc7995c59f4c36eb072bf96318dd537f5e525 100644 (file)
@@ -66,8 +66,7 @@ pub enum DecodeError {
        /// A length descriptor in the packet didn't describe the later data correctly
        BadLengthDescriptor,
        /// Error from std::io
-       Io(/// (C-not exported) as ErrorKind doesn't have a reasonable mapping
-        io::ErrorKind),
+       Io(io::ErrorKind),
        /// The message included zlib-compressed values, which we don't support.
        UnsupportedCompression,
 }
@@ -311,7 +310,7 @@ pub struct UpdateAddHTLC {
 pub struct OnionMessage {
        /// Used in decrypting the onion packet's payload.
        pub blinding_point: PublicKey,
-       pub(crate) onion_routing_packet: onion_message::Packet,
+       pub(crate) onion_routing_packet: onion_message::packet::Packet,
 }
 
 /// An update_fulfill_htlc message to be sent or received from a peer
@@ -1423,7 +1422,7 @@ impl Readable for OnionMessage {
                let blinding_point: PublicKey = Readable::read(r)?;
                let len: u16 = Readable::read(r)?;
                let mut packet_reader = FixedLengthReader::new(r, len as u64);
-               let onion_routing_packet: onion_message::Packet = <onion_message::Packet as LengthReadable>::read(&mut packet_reader)?;
+               let onion_routing_packet = <onion_message::packet::Packet as LengthReadable>::read(&mut packet_reader)?;
                Ok(Self {
                        blinding_point,
                        onion_routing_packet,