Create eip7251 config invariants test

This commit is contained in:
Mikhail Kalinin 2024-03-20 15:05:59 +06:00
parent a127bbf0c6
commit 17d65ca6b4
3 changed files with 12 additions and 7 deletions

View File

@ -0,0 +1,12 @@
from eth2spec.test.context import (
single_phase,
spec_test,
with_eip7251_and_later,
)
@with_eip7251_and_later
@spec_test
@single_phase
def test_withdrawals(spec):
assert spec.MAX_PARTIAL_WITHDRAWALS_PER_PAYLOAD < spec.MAX_WITHDRAWALS_PER_PAYLOAD

View File

@ -1,7 +1,6 @@
from eth2spec.test.context import ( from eth2spec.test.context import (
spec_state_test, spec_state_test,
with_all_phases, with_all_phases,
with_eip7251_and_later,
) )
from eth2spec.test.helpers.constants import UINT64_MAX from eth2spec.test.helpers.constants import UINT64_MAX
from eth2spec.test.helpers.forks import ( from eth2spec.test.helpers.forks import (
@ -92,9 +91,3 @@ def test_networking(spec, state):
def test_fork_choice(spec, state): def test_fork_choice(spec, state):
assert spec.INTERVALS_PER_SLOT < spec.config.SECONDS_PER_SLOT assert spec.INTERVALS_PER_SLOT < spec.config.SECONDS_PER_SLOT
assert spec.config.PROPOSER_SCORE_BOOST <= 100 assert spec.config.PROPOSER_SCORE_BOOST <= 100
@with_eip7251_and_later
@spec_state_test
def test_withdrawals(spec, state):
assert spec.MAX_PARTIAL_WITHDRAWALS_PER_PAYLOAD < spec.MAX_WITHDRAWALS_PER_PAYLOAD