projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add unknown message handler to peer manager
[rust-lightning]
/
lightning
/
src
/
ln
/
wire.rs
diff --git
a/lightning/src/ln/wire.rs
b/lightning/src/ln/wire.rs
index 0ee280b50e4e72ffc4290333a960a9a09853ae93..7a495d98f518f6e83aee31a9b993b8d2407fa80e 100644
(file)
--- a/
lightning/src/ln/wire.rs
+++ b/
lightning/src/ln/wire.rs
@@
-62,6
+62,13
@@
pub enum Message {
#[derive(Clone, Copy, Debug)]
pub struct MessageType(u16);
#[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.
impl Message {
#[allow(dead_code)] // This method is only used in tests
/// Returns the type that was used to decode the message payload.