Moves copy into SSZ container

This commit is contained in:
Carl Beekhuizen
2019-06-20 20:55:28 +02:00
parent 5f8edd6b55
commit c26fffc154
3 changed files with 7 additions and 6 deletions

View File

@@ -1,3 +1,4 @@
import copy
from types import GeneratorType
from typing import (
List,
@@ -151,6 +152,9 @@ class Container(object):
def __hash__(self):
return hash(self.hash_tree_root())
def copy(self):
return copy.deepcopy(self)
@classmethod
def get_fields_dict(cls):
return dict(cls.__annotations__)