Commit 7cf7308
committed
Fix unknown handling in
`impl_writeable_tlv_based_enum_upgradable` professed to supporting
upgrades by returning `None` from `MaybeReadable` when unknown
variants written by newer versions of LDK were read. However, it
generally didn't support this as it didn't discard bytes for
unknown types, resulting in corrupt reading.
This is fixed here for enum variants written as a TLV stream,
however we don't have a length prefix for tuple enum variants, so
the documentation on the macro is updated to mention that
downgrades are not supported for tuple variants.impl_writeable_tlv_based_enum_upgradable
1 parent b8b1ef3 commit 7cf7308
1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1065 | 1065 | | |
1066 | 1066 | | |
1067 | 1067 | | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1068 | 1072 | | |
1069 | 1073 | | |
1070 | 1074 | | |
| |||
1102 | 1106 | | |
1103 | 1107 | | |
1104 | 1108 | | |
1105 | | - | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
1106 | 1117 | | |
1107 | 1118 | | |
1108 | 1119 | | |
| |||
0 commit comments