mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 09:34:24 +01:00
msggen: fix incorrect assertion.
Adding a new field with `added` fails: ``` AssertionError: Field Feerates.perkb.estimates[] does not have an `added` annotation ``` Looks like this assertion is wrong: we should get an added from the field itself or from the .msggen.json file. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -67,7 +67,7 @@ class VersionAnnotationPatch(Patch):
|
||||
added = m.get('added', None)
|
||||
deprecated = m.get('deprecated', None)
|
||||
|
||||
assert added or not f.added, f"Field {f.path} does not have an `added` annotation"
|
||||
assert added or f.added, f"Field {f.path} does not have an `added` annotation"
|
||||
|
||||
# We do not allow the added and deprecated flags to be
|
||||
# modified after the fact.
|
||||
|
||||
Reference in New Issue
Block a user