Apply suggestions from code review

Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
This commit is contained in:
Danny Ryan 2021-10-19 14:35:30 -06:00 committed by GitHub
parent cd5cf60deb
commit e787da3954
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -65,7 +65,7 @@ class PowBlock(Container):
### `get_pow_block`
Let `get_pow_block(block_hash: Hash32) -> Optional[PowBlock]` be the function that given the hash of the PoW block returns its data.
It may result in `None` if the requested block is not found if execution engine is still syncing.
It may result in `None` if the requested block is not yet available.
*Note*: The `eth_getBlockByHash` JSON-RPC method may be used to pull this information from an execution client.
@ -117,7 +117,8 @@ def on_block(store: Store, signed_block: SignedBeaconBlock) -> None:
# [New in Merge]
if is_merge_block(pre_state, block.body):
# Note: the unavailable PoW block(s) may be available later
# Note: unavailable PoW block(s) may later become available.
# Nodes should queue such beacon blocks for later processing.
pow_block = get_pow_block(block.body.execution_payload.parent_hash)
assert pow_block is not None
pow_parent = get_pow_block(pow_block.parent_hash)