X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fwire.rs;h=0ee280b50e4e72ffc4290333a960a9a09853ae93;hb=d36a875f9895c06804802ebb199e2103cba89b6d;hp=58d336ba06942206e306423e8b643e86a982c8aa;hpb=3ea4279d55d45bb0150b31b195e100c8ee95f5d9;p=rust-lightning diff --git a/lightning/src/ln/wire.rs b/lightning/src/ln/wire.rs index 58d336ba..0ee280b5 100644 --- a/lightning/src/ln/wire.rs +++ b/lightning/src/ln/wire.rs @@ -24,6 +24,7 @@ use util::ser::{Readable, Writeable, Writer}; /// A Lightning message returned by [`read()`] when decoding bytes received over the wire. Each /// variant contains a message from [`msgs`] or otherwise the message type if unknown. #[allow(missing_docs)] +#[derive(Debug)] pub enum Message { Init(msgs::Init), Error(msgs::ErrorMessage), @@ -58,10 +59,11 @@ pub enum Message { } /// A number identifying a message to determine how it is encoded on the wire. -#[derive(Clone, Copy)] +#[derive(Clone, Copy, Debug)] pub struct MessageType(u16); impl Message { + #[allow(dead_code)] // This method is only used in tests /// Returns the type that was used to decode the message payload. pub fn type_id(&self) -> MessageType { match self {