explicitly use Optiona type for fork_version in compute_domain

Co-Authored-By: Carl Beekhuizen <carl@ethereum.org>
This commit is contained in:
Danny Ryan 2020-01-22 11:27:45 -07:00
parent cf18b040b4
commit e821476c07
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ from eth2spec.utils.hash_function import hash
SSZObject = TypeVar('SSZObject', bound=SSZType) SSZObject = TypeVar('SSZObject', bound=SSZType)
''' '''
PHASE1_IMPORTS = '''from typing import ( PHASE1_IMPORTS = '''from typing import (
Any, Dict, Set, Sequence, MutableSequence, NewType, Tuple, Union, TypeVar Any, Dict, Set, Sequence, MutableSequence, NewType, Optional, Tuple, Union, TypeVar
) )
from math import ( from math import (
log2, log2,

View File

@ -788,7 +788,7 @@ def compute_activation_exit_epoch(epoch: Epoch) -> Epoch:
#### `compute_domain` #### `compute_domain`
```python ```python
def compute_domain(domain_type: DomainType, fork_version: Version=None) -> Domain: def compute_domain(domain_type: DomainType, fork_version: Optional[Version]=None) -> Domain:
""" """
Return the domain for the ``domain_type`` and ``fork_version``. Return the domain for the ``domain_type`` and ``fork_version``.
""" """