mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-02 23:55:13 -05:00
one more rootslot fix
This commit is contained in:
@@ -157,7 +157,8 @@ def on_block(store: Store, block: BeaconBlock) -> None:
|
||||
# Check that block is later than the finalized epoch slot
|
||||
assert blocks.slot > get_epoch_start_slot(store.finalized_epoch)
|
||||
# Check block slot against Unix time
|
||||
pre_state = deepcopy(store.states[block.parent_root])
|
||||
parent_block = store.blocks[block.parent_root]
|
||||
pre_state = deepcopy(store.states[RootSlot(signing_root(parent_block), parent_block.slot)])
|
||||
assert store.time >= pre_state.genesis_time + block.slot * SECONDS_PER_SLOT
|
||||
# Check the block is valid and compute the post-state
|
||||
state = state_transition(pre_state, block)
|
||||
|
||||
Reference in New Issue
Block a user