projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
49ab8c2
)
Ignore unknown Events serialized with an odd type value.
author
Matt Corallo
<git@bluematt.me>
Thu, 15 Jul 2021 16:30:52 +0000
(16:30 +0000)
committer
Matt Corallo
<git@bluematt.me>
Wed, 28 Jul 2021 17:35:09 +0000
(17:35 +0000)
This should provide some additional future extensibility, allowing
for new informational events which can be safely ignored to be
ignored by older versions.
lightning/src/util/events.rs
patch
|
blob
|
history
diff --git
a/lightning/src/util/events.rs
b/lightning/src/util/events.rs
index 876dfe6abb551f359a6c67c60fe05c1d104b81ed..3376701042e2e5c66985b8f4f82d4a93b25c4136 100644
(file)
--- a/
lightning/src/util/events.rs
+++ b/
lightning/src/util/events.rs
@@
-312,6
+312,8
@@
impl MaybeReadable for Event {
};
f()
},
};
f()
},
+ // Versions prior to 0.0.100 did not ignore odd types, instead returning InvalidValue.
+ x if x % 2 == 1 => Ok(None),
_ => Err(msgs::DecodeError::InvalidValue)
}
}
_ => Err(msgs::DecodeError::InvalidValue)
}
}