Skip to content

Commit 8ffc2d1

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 49ab8c2 commit 8ffc2d1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lightning/src/util/events.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ impl MaybeReadable for Event {
312312
};
313313
f()
314314
},
315+
// Versions prior to 0.0.100 did not ignore odd types, instead returning InvalidValue.
316+
x if x % 2 == 1 => Ok(None),
315317
_ => Err(msgs::DecodeError::InvalidValue)
316318
}
317319
}

0 commit comments

Comments
 (0)