clean leftover

This commit is contained in:
Hsiao-Wei Wang 2020-06-05 21:49:50 +08:00
parent 2d4788fe7d
commit 2afa315cb3
No known key found for this signature in database
GPG Key ID: 95B070122902DEA4
1 changed files with 1 additions and 3 deletions

View File

@ -85,9 +85,7 @@ def build_attestation_data(spec, state, slot, index, shard_transition=None, on_t
# No shard transition -> no shard block
shard = spec.get_shard(state, spec.Attestation(data=attestation_data))
if on_time:
temp_state = state.copy()
next_slot(spec, temp_state)
shard_transition = spec.get_shard_transition(temp_state, shard, shard_blocks=[], on_time_slot=slot + 1)
shard_transition = spec.get_shard_transition(state, shard, shard_blocks=[], on_time_slot=slot + 1)
lastest_shard_data_root_index = len(shard_transition.shard_data_roots) - 1
attestation_data.shard_head_root = shard_transition.shard_data_roots[lastest_shard_data_root_index]
attestation_data.shard_transition_root = shard_transition.hash_tree_root()