mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-26 09:15:17 +00:00
bugfix: make correct attestation type across fork boundary
This commit is contained in:
parent
a626a79850
commit
d35b4091fb
@ -11,6 +11,7 @@ from eth2spec.test.helpers.block import (
|
|||||||
)
|
)
|
||||||
from eth2spec.test.helpers.constants import (
|
from eth2spec.test.helpers.constants import (
|
||||||
AFTER_DENEB_PRE_POST_FORKS,
|
AFTER_DENEB_PRE_POST_FORKS,
|
||||||
|
DENEB,
|
||||||
)
|
)
|
||||||
from eth2spec.test.helpers.state import (
|
from eth2spec.test.helpers.state import (
|
||||||
next_epoch_via_block,
|
next_epoch_via_block,
|
||||||
@ -78,7 +79,13 @@ def test_transition_attestation_from_previous_fork_with_new_range(
|
|||||||
next_epoch_via_block(spec, state)
|
next_epoch_via_block(spec, state)
|
||||||
|
|
||||||
# Generate an attestation for slot 0 of this epoch
|
# Generate an attestation for slot 0 of this epoch
|
||||||
attestation = get_valid_attestation(spec, state, signed=True)
|
if spec.fork == DENEB:
|
||||||
|
# NOTE: attestation format changes from Deneb to Electra
|
||||||
|
# so the attestation must be made with the `post_spec`
|
||||||
|
target_spec = post_spec
|
||||||
|
else:
|
||||||
|
target_spec = spec
|
||||||
|
attestation = get_valid_attestation(target_spec, state, signed=True)
|
||||||
|
|
||||||
yield 'pre', state
|
yield 'pre', state
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user