msggen: fix deprecated from "False" to "None".

Turns out we set this to False instead of None, so new field get "deprecated": False.
When we actually deprecate one, we get the following error:

	ValueError: Field Decode.offer_node_id changed `deprecated` annotation: v24.08 vs False

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2024-07-18 10:57:55 +09:30
parent 21a83a8f79
commit 0a1aa972d8

View file

@ -305,7 +305,7 @@ class CompositeField(Field):
) )
if field is not None: if field is not None:
field.deprecated = ftype.get("deprecated", False) field.deprecated = ftype.get("deprecated", None)
field.required = fname in required field.required = fname in required
fields.append(field) fields.append(field)
logger.debug(field) logger.debug(field)