mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
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>
This commit is contained in:
parent
4fde45669c
commit
06372e13d8
@ -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…
Reference in New Issue
Block a user