From ea79d118880cb05c200fbef10b4ab4fd57bcfa03 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Fri, 5 Apr 2024 14:30:32 -0600 Subject: [PATCH] bugfix: make correct attestation type across fork boundary --- .../eth2spec/test/deneb/transition/test_operations.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/core/pyspec/eth2spec/test/deneb/transition/test_operations.py b/tests/core/pyspec/eth2spec/test/deneb/transition/test_operations.py index 27c27c8c6d..d69523ac1d 100644 --- a/tests/core/pyspec/eth2spec/test/deneb/transition/test_operations.py +++ b/tests/core/pyspec/eth2spec/test/deneb/transition/test_operations.py @@ -11,6 +11,7 @@ ) from eth2spec.test.helpers.constants import ( AFTER_DENEB_PRE_POST_FORKS, + DENEB, ) from eth2spec.test.helpers.state import ( next_epoch_via_block, @@ -78,7 +79,11 @@ def test_transition_attestation_from_previous_fork_with_new_range( next_epoch_via_block(spec, state) # Generate an attestation for slot 0 of this epoch - attestation = get_valid_attestation(spec, state, signed=True) + if spec.fork == DENEB: + target_spec = post_spec + else: + target_spec = spec + attestation = get_valid_attestation(target_spec, state, signed=True) yield 'pre', state