def __init__(self, base_db: BaseDB) -> None: if not self.vm_configuration: raise ValueError( "The Chain class cannot be instantiated with an empty `vm_configuration`" ) else: validate_vm_configuration(self.vm_configuration) self.chaindb = self.get_chaindb_class()(base_db) self.headerdb = HeaderDB(base_db) if self.gas_estimator is None: self.gas_estimator = get_gas_estimator() # type: ignore
def __init__(self, base_db: AtomicDatabaseAPI) -> None: if not self.vm_configuration: raise ValueError( "The Chain class cannot be instantiated with an empty `vm_configuration`" ) else: validate_vm_configuration(self.vm_configuration) self.chaindb = self.get_chaindb_class()(base_db) self.consensus_context = self.consensus_context_class(self.chaindb.db) self.headerdb = HeaderDB(base_db) if self.gas_estimator is None: self.gas_estimator = get_gas_estimator()