From c73417b4cae0335e348f1a4d06968506301aeb64 Mon Sep 17 00:00:00 2001 From: protolambda Date: Mon, 24 Jun 2019 23:40:47 +0200 Subject: [PATCH] deserialize-basic detail, make subclass --- test_libs/pyspec/eth2spec/utils/ssz/ssz_impl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_libs/pyspec/eth2spec/utils/ssz/ssz_impl.py b/test_libs/pyspec/eth2spec/utils/ssz/ssz_impl.py index 144201d83..e2a264955 100644 --- a/test_libs/pyspec/eth2spec/utils/ssz/ssz_impl.py +++ b/test_libs/pyspec/eth2spec/utils/ssz/ssz_impl.py @@ -27,7 +27,7 @@ def deserialize_basic(value, typ: BasicType): return typ(int.from_bytes(value, 'little')) elif issubclass(typ, Bit): assert value in (b'\x00', b'\x01') - return Bit(value == b'\x01') + return typ(value == b'\x01') else: raise Exception(f"Type not supported: {typ}")