Browse Source

pyln.proto.message: don't let Message() init set implicit lengths.

We'll override them from field length anyway!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
bump-pyln-proto
Rusty Russell 4 years ago
committed by Christian Decker
parent
commit
06372e13d8
  1. 3
      contrib/pyln-proto/pyln/proto/message/message.py

3
contrib/pyln-proto/pyln/proto/message/message.py

@ -600,7 +600,8 @@ class Message(object):
f = self.messagetype.find_field(field)
if f is None:
raise ValueError("Unknown field {}".format(field))
if isinstance(f.fieldtype, LengthFieldType):
raise ValueError("Cannot specify implied length field {}".format(field))
if isinstance(val, str):
val, remainder = f.fieldtype.val_from_str(val)
if remainder != '':

Loading…
Cancel
Save