File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 35
35
GENESIS_PARENT_HASH ,
36
36
)
37
37
from eth .exceptions import (
38
+ CanonicalHeadNotFound ,
38
39
HeaderNotFound ,
39
40
ReceiptNotFound ,
40
41
TransactionNotFound ,
Original file line number Diff line number Diff line change 1
1
import functools
2
- from typing import Iterable , Tuple
2
+ from typing import cast , Iterable , Tuple
3
3
4
4
import rlp
5
5
@@ -89,7 +89,7 @@ def _get_canonical_head(cls, db: DatabaseAPI) -> BlockHeaderAPI:
89
89
@classmethod
90
90
def _get_canonical_head_hash (cls , db : DatabaseAPI ) -> Hash32 :
91
91
try :
92
- return db [SchemaV1 .make_canonical_head_hash_lookup_key ()]
92
+ return cast ( Hash32 , db [SchemaV1 .make_canonical_head_hash_lookup_key ()])
93
93
except KeyError :
94
94
raise CanonicalHeadNotFound ("No canonical head set for this chain" )
95
95
You can’t perform that action at this time.
0 commit comments