make linter happy
This commit is contained in:
parent
cdcf45855a
commit
4cac761818
|
@ -170,7 +170,11 @@ def on_block(store: Store, signed_block: SignedBeaconBlock) -> None:
|
|||
finalized_slot = compute_start_slot_at_epoch(store.finalized_checkpoint.epoch)
|
||||
assert block.slot > finalized_slot
|
||||
# Check block is a descendant of the finalized block at the checkpoint finalized slot
|
||||
assert get_ancestor_at_epoch_boundary(store, block.parent_root, store.finalized_checkpoint.epoch) == store.finalized_checkpoint.root
|
||||
assert store.finalized_checkpoint.root == get_ancestor_at_epoch_boundary(
|
||||
store,
|
||||
block.parent_root,
|
||||
store.finalized_checkpoint.epoch,
|
||||
)
|
||||
|
||||
# Check the block is valid and compute the post-state
|
||||
state = pre_state.copy()
|
||||
|
|
|
@ -82,7 +82,11 @@ def on_block(store: Store, signed_block: SignedBeaconBlock) -> None:
|
|||
finalized_slot = compute_start_slot_at_epoch(store.finalized_checkpoint.epoch)
|
||||
assert block.slot > finalized_slot
|
||||
# Check block is a descendant of the finalized block at the checkpoint finalized slot
|
||||
assert get_ancestor_at_epoch_boundary(store, block.parent_root, store.finalized_checkpoint.epoch) == store.finalized_checkpoint.root
|
||||
assert store.finalized_checkpoint.root == get_ancestor_at_epoch_boundary(
|
||||
store,
|
||||
block.parent_root,
|
||||
store.finalized_checkpoint.epoch,
|
||||
)
|
||||
|
||||
# [New in Deneb]
|
||||
# Check if blob data is available
|
||||
|
|
|
@ -292,7 +292,11 @@ def filter_block_tree(store: Store, block_root: Root, blocks: Dict[Root, BeaconB
|
|||
|
||||
correct_finalized = (
|
||||
store.finalized_checkpoint.epoch == GENESIS_EPOCH
|
||||
or store.finalized_checkpoint.root == get_ancestor_at_epoch_boundary(store, block_root, store.finalized_checkpoint.epoch)
|
||||
or store.finalized_checkpoint.root == get_ancestor_at_epoch_boundary(
|
||||
store,
|
||||
block_root,
|
||||
store.finalized_checkpoint.epoch,
|
||||
)
|
||||
)
|
||||
|
||||
# If expected finalized/justified, add to viable block-tree and signal viability to parent.
|
||||
|
@ -516,7 +520,11 @@ def on_block(store: Store, signed_block: SignedBeaconBlock) -> None:
|
|||
finalized_slot = compute_start_slot_at_epoch(store.finalized_checkpoint.epoch)
|
||||
assert block.slot > finalized_slot
|
||||
# Check block is a descendant of the finalized block at the checkpoint finalized slot
|
||||
assert get_ancestor_at_epoch_boundary(store, block.parent_root, store.finalized_checkpoint.epoch) == store.finalized_checkpoint.root
|
||||
assert store.finalized_checkpoint.root == get_ancestor_at_epoch_boundary(
|
||||
store,
|
||||
block.parent_root,
|
||||
store.finalized_checkpoint.epoch,
|
||||
)
|
||||
|
||||
# Check the block is valid and compute the post-state
|
||||
state = pre_state.copy()
|
||||
|
|
Loading…
Reference in New Issue