re-enable state_transition() rollback in phase0 (#2613)

This commit is contained in:
tersec 2021-05-29 03:54:56 +00:00 committed by GitHub
parent e8c62553ec
commit aa6177814e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,8 +226,8 @@ proc state_transition*(
# that the block is sane. # that the block is sane.
if not (skipBLSValidation in flags or if not (skipBLSValidation in flags or
verify_block_signature(state.data, signedBlock)): verify_block_signature(state.data, signedBlock)):
when false: when not (state is altair.HashedBeaconState):
# TODO fixme # TODO re-enable in Altair
rollback(state) rollback(state)
return false return false
@ -244,15 +244,15 @@ proc state_transition*(
eth1_deposit_index = state.data.eth1_deposit_index, eth1_deposit_index = state.data.eth1_deposit_index,
deposit_root = shortLog(state.data.eth1_data.deposit_root), deposit_root = shortLog(state.data.eth1_data.deposit_root),
error = res.error error = res.error
when false: when not (state is altair.HashedBeaconState):
# TODO re-enable # TODO re-enable in Altair
rollback(state) rollback(state)
return false return false
if not (skipStateRootValidation in flags or if not (skipStateRootValidation in flags or
verifyStateRoot(state.data, signedBlock.message)): verifyStateRoot(state.data, signedBlock.message)):
when false: when not (state is altair.HashedBeaconState):
# TODO re-enable # TODO re-enable in Altair
rollback(state) rollback(state)
return false return false