예제 #1
0
 def __init__(self):
     if not is_pyethereum16_available():
         version = get_pyethereum_version()
         if version is None:
             raise pkg_resources.DistributionNotFound(
                 "The `ethereum` package is not available.  The "
                 "`PyEthereum16Backend` requires a 1.6.x version of the "
                 "ethereum package to be installed.")
         elif version not in Spec('>=1.6.0,<1.7.0'):
             raise pkg_resources.DistributionNotFound(
                 "The `PyEthereum16Backend` requires a 1.6.x version of the "
                 "`ethereum` package.  Found {0}".format(version))
     self.reset_to_genesis()
예제 #2
0
 def __init__(self):
     if not is_pyethereum21_available():
         version = get_pyethereum_version()
         if version is None:
             raise BackendDistributionNotFound(
                 "The `ethereum` package is not available.  The "
                 "`PyEthereum21Backend` requires a 2.0.0+ version of the "
                 "ethereum package to be installed.")
         elif version not in Spec('>=2.0.0,<2.2.0'):
             raise BackendDistributionNotFound(
                 "The `PyEthereum21Backend` requires a 2.0.0+ version of the "
                 "`ethereum` package.  Found {0}".format(version))
     self.fork_blocks = {}
     self.reset_to_genesis()