Fix Optional[TransitionStore] issue to satisfy linter

This commit is contained in:
Mikhail Kalinin 2021-06-03 16:08:56 +06:00
parent 6872c01682
commit 7f64757b51
1 changed files with 1 additions and 2 deletions

View File

@ -126,8 +126,7 @@ def on_block(store: Store, signed_block: SignedBeaconBlock, transition_store: Tr
assert get_ancestor(store, block.parent_root, finalized_slot) == store.finalized_checkpoint.root assert get_ancestor(store, block.parent_root, finalized_slot) == store.finalized_checkpoint.root
# [New in Merge] # [New in Merge]
is_transition_store_initialized = (transition_store is not None) if (transition_store is not None) and is_transition_block(pre_state, block):
if is_transition_store_initialized and is_transition_block(pre_state, block):
# Delay consideration of block until PoW block is processed by the PoW node # Delay consideration of block until PoW block is processed by the PoW node
pow_block = get_pow_block(block.body.execution_payload.parent_hash) pow_block = get_pow_block(block.body.execution_payload.parent_hash)
assert pow_block.is_processed assert pow_block.is_processed