Merge pull request #2673 from ethereum/fix-test

fix issue with mutation in test generation
This commit is contained in:
Diederik Loerakker 2021-10-16 02:04:45 +03:00 committed by GitHub
commit 6852c5a1d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -288,7 +288,7 @@ def run_transition_with_operation(state,
# after the fork
if operation_type == OperationType.DEPOSIT:
_transition_until_active(post_spec, state, post_tag, blocks, selected_validator_index)
state = _transition_until_active(post_spec, state, post_tag, blocks, selected_validator_index)
else:
# avoid using the slashed validators as block proposers
ignoring_proposers = [selected_validator_index] if is_slashing_operation else None
@ -332,3 +332,5 @@ def _transition_until_active(post_spec, state, post_tag, blocks, validator_index
state_transition_across_slots(post_spec, state, to_slot, block_filter=only_at(to_slot))
])
assert post_spec.is_active_validator(state.validators[validator_index], post_spec.get_current_epoch(state))
return state