Skip to content

Commit e00bf8d

Browse files
committed
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.
1 parent a8b7978 commit e00bf8d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lightning/src/util/events.rs

+2
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ impl MaybeReadable for Event {
275275
};
276276
f()
277277
},
278+
// Versions prior to 0.0.100 did not ignore odd types, instead returning InvalidValue.
279+
x if x % 2 == 1 => Ok(None),
278280
_ => Err(msgs::DecodeError::InvalidValue)
279281
}
280282
}

0 commit comments

Comments
 (0)