From bbaa1417a8fe52553a8a272ae50f7ab6331d1d1b Mon Sep 17 00:00:00 2001 From: protolambda Date: Thu, 2 May 2019 09:16:01 +0200 Subject: [PATCH] remove incorrect unnecessary offset --- test_libs/pyspec/eth2spec/utils/minimal_ssz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_libs/pyspec/eth2spec/utils/minimal_ssz.py b/test_libs/pyspec/eth2spec/utils/minimal_ssz.py index 35960a7ce..9cc2baebb 100644 --- a/test_libs/pyspec/eth2spec/utils/minimal_ssz.py +++ b/test_libs/pyspec/eth2spec/utils/minimal_ssz.py @@ -163,7 +163,7 @@ def serialize_value(value, typ=None): return encode_series(value, [typ[0]] * len(value)) # "bytes" (variable size) elif isinstance(typ, str) and typ == 'bytes': - return (b"\x00" * BYTES_PER_LENGTH_OFFSET) + coerce_to_bytes(value) + return coerce_to_bytes(value) # "bytesN" (fixed size) elif isinstance(typ, str) and len(typ) > 5 and typ[:5] == 'bytes': assert len(value) == int(typ[5:]), (value, int(typ[5:]))