Skip to content

Commit

Permalink
bugfix: make correct attestation type across fork boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed Apr 5, 2024
1 parent a626a79 commit ea79d11
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit ea79d11

Please sign in to comment.