lnmsg: support both primitive and complex types (subtypes) in LNSerializer.
This renames lnmsg._{read,write}_field to lnmsg._{read,write}_primitive_field, renames
LNSerializer._{read,write}_complex_type to LNSerializer.{read,write}_field and allows
LNSerializer.{read,write}_field to handle both primitive and complex types.
Also makes these funcs public, as these encodings are used outside of lnmsg as well
(e.g. encoding blinded paths in BOLT12 invoice_request)
This commit is contained in:
@@ -194,7 +194,7 @@ class TestOnionMessage(ElectrumTestCase):
|
||||
|
||||
# TODO: serialization test to test_lnmsg.py
|
||||
with io.BytesIO() as blinded_path_fd:
|
||||
OnionWireSerializer._write_complex_field(
|
||||
OnionWireSerializer.write_field(
|
||||
fd=blinded_path_fd,
|
||||
field_type='blinded_path',
|
||||
count=1,
|
||||
|
||||
Reference in New Issue
Block a user