We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9b4e40 commit 3bd386cCopy full SHA for 3bd386c
eth/db/header.py
@@ -84,12 +84,12 @@ def get_canonical_head(self) -> BlockHeaderAPI:
84
@classmethod
85
def _get_canonical_head(cls, db: DatabaseAPI) -> BlockHeaderAPI:
86
canonical_head_hash = cls._get_canonical_head_hash(db)
87
- return cls._get_block_header_by_hash(db, Hash32(canonical_head_hash))
+ return cls._get_block_header_by_hash(db, canonical_head_hash)
88
89
90
def _get_canonical_head_hash(cls, db: DatabaseAPI) -> Hash32:
91
try:
92
- return cast(Hash32, db[SchemaV1.make_canonical_head_hash_lookup_key()])
+ return Hash32(db[SchemaV1.make_canonical_head_hash_lookup_key()])
93
except KeyError:
94
raise CanonicalHeadNotFound("No canonical head set for this chain")
95
0 commit comments