diff --git a/contrib/pyln-proto/pyln/proto/message/message.py b/contrib/pyln-proto/pyln/proto/message/message.py index 1b8d8f37f..02af803f1 100644 --- a/contrib/pyln-proto/pyln/proto/message/message.py +++ b/contrib/pyln-proto/pyln/proto/message/message.py @@ -592,6 +592,7 @@ Returns None on EOF if fields[f.name] is None: # optional fields are OK to be missing at end! if f.option is not None: + del fields[f.name] break raise ValueError('{}: truncated at field {}' .format(mtype, f.name))