Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 65d2c4a

Browse files
committed
eth/vm/state: expect Hash32 (not bytes) in __init__ of BaseState.
Again, 99.99% cargo-culting. This just silences a `mypy` error: eth/vm/state.py:57: error: Argument 2 to "AccountDatabaseAPI" has incompatible type "bytes"; expected "Hash32" A valid state root will definitely be a 32-byte-long hash. Question is if this is the right place to make sure of it; and whether that should be made more explicit in code than being picky about a type. This commit has been cherry-picked from previous PR: 851c141
1 parent 5e6d607 commit 65d2c4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eth/vm/state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __init__(
5252
self,
5353
db: AtomicDatabaseAPI,
5454
execution_context: ExecutionContextAPI,
55-
state_root: bytes) -> None:
55+
state_root: Hash32) -> None:
5656
self._db = db
5757
self.execution_context = execution_context
5858
self._account_db = self.get_account_db_class()(db, state_root)

0 commit comments

Comments
 (0)