mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-20 23:49:54 +00:00
Workarounds for EIP-7549 tests
This commit is contained in:
parent
c0fa05de1e
commit
353bbb02a6
@ -83,9 +83,12 @@ def test_transition_attestation_from_previous_fork_with_new_range(
|
||||
# NOTE: attestation format changes from Deneb to Electra
|
||||
# so the attestation must be made with the `post_spec`
|
||||
target_spec = post_spec
|
||||
target_state = post_spec.upgrade_to_electra(state.copy())
|
||||
target_state.fork = state.fork
|
||||
else:
|
||||
target_spec = spec
|
||||
attestation = get_valid_attestation(target_spec, state, signed=True)
|
||||
target_state = state
|
||||
attestation = get_valid_attestation(target_spec, target_state, signed=True)
|
||||
|
||||
yield 'pre', state
|
||||
|
||||
|
@ -302,11 +302,14 @@ def run_transition_with_operation(state,
|
||||
# NOTE: attestation format changes between Deneb and Electra
|
||||
# so attester slashing must be made with the `post_spec`
|
||||
target_spec = post_spec
|
||||
target_state = post_spec.upgrade_to_electra(state.copy())
|
||||
target_state.fork = state.fork
|
||||
else:
|
||||
target_spec = spec
|
||||
target_state = state
|
||||
|
||||
attester_slashing = get_valid_attester_slashing_by_indices(
|
||||
target_spec, state,
|
||||
target_spec, target_state,
|
||||
[selected_validator_index],
|
||||
signed_1=True, signed_2=True,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user