Add unknown message handler to peer manager
[rust-lightning] / lightning / src / ln / wire.rs
index 0ee280b50e4e72ffc4290333a960a9a09853ae93..7a495d98f518f6e83aee31a9b993b8d2407fa80e 100644 (file)
@@ -62,6 +62,13 @@ pub enum Message {
 #[derive(Clone, Copy, Debug)]
 pub struct MessageType(u16);
 
+impl ::std::ops::Deref for MessageType {
+       type Target = u16;
+       fn deref(&self) -> &Self::Target {
+               &self.0
+       }
+}
+
 impl Message {
        #[allow(dead_code)] // This method is only used in tests
        /// Returns the type that was used to decode the message payload.