Merge pull request #2013 from terencechain/patch-111
apply_shard_transition: copy shard state
This commit is contained in:
commit
0ea627769e
|
@ -867,9 +867,10 @@ def apply_shard_transition(state: BeaconState, shard: Shard, transition: ShardTr
|
|||
# Verify combined proposer signature
|
||||
assert optional_aggregate_verify(pubkeys, signing_roots, transition.proposer_signature_aggregate)
|
||||
|
||||
# Save updated state
|
||||
state.shard_states[shard] = transition.shard_states[len(transition.shard_states) - 1]
|
||||
state.shard_states[shard].slot = compute_previous_slot(state.slot)
|
||||
# Copy and save updated shard state
|
||||
shard_state = copy(transition.shard_states[len(transition.shard_states) - 1])
|
||||
shard_state.slot = compute_previous_slot(state.slot)
|
||||
state.shard_states[shard] = shard_state
|
||||
```
|
||||
|
||||
###### `process_crosslink_for_shard`
|
||||
|
|
Loading…
Reference in New Issue