From: Matt Corallo Date: Thu, 15 Jul 2021 16:30:52 +0000 (+0000) Subject: Ignore unknown Events serialized with an odd type value. X-Git-Tag: v0.0.100~10^2~3 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=8ffc2d1742ff1171a87b0410b21cbbd557ff8247;p=rust-lightning Ignore unknown Events serialized with an odd type value. This should provide some additional future extensibility, allowing for new informational events which can be safely ignored to be ignored by older versions. --- diff --git a/lightning/src/util/events.rs b/lightning/src/util/events.rs index 876dfe6ab..337670104 100644 --- a/lightning/src/util/events.rs +++ b/lightning/src/util/events.rs @@ -312,6 +312,8 @@ impl MaybeReadable for Event { }; 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) } }