From e2d13bfe089dad6dd83bbf20ebc51f7c1bedc2dd Mon Sep 17 00:00:00 2001 From: Dankrad Feist Date: Tue, 12 Mar 2019 16:32:25 +0100 Subject: [PATCH] Fix in minimal_ssz.py --- spec_pythonizer/minimal_ssz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec_pythonizer/minimal_ssz.py b/spec_pythonizer/minimal_ssz.py index 466100b8..26e386ec 100644 --- a/spec_pythonizer/minimal_ssz.py +++ b/spec_pythonizer/minimal_ssz.py @@ -83,7 +83,7 @@ def serialize_value(value, typ): return serialized_length + serialized_bytes elif isinstance(typ, list) and len(typ) == 2: assert len(value) == typ[1] - return ''.join([serialize_value(element, typ[0]) for element in value]) + return b''.join([serialize_value(element, typ[0]) for element in value]) elif isinstance(typ, str) and len(typ) > 5 and typ[:5] == 'bytes': assert len(value) == int(typ[5:]), (value, int(typ[5:])) return coerce_to_bytes(value)