Add more checks

This commit is contained in:
Hsiao-Wei Wang
2021-05-26 01:21:04 +08:00
parent 69f2a31406
commit b5f9b5d74f
2 changed files with 12 additions and 0 deletions

View File

@@ -15,3 +15,9 @@ def test_weight_denominator(spec, state):
+ spec.SYNC_REWARD_WEIGHT
+ spec.PROPOSER_WEIGHT
) == spec.WEIGHT_DENOMINATOR
@with_phases([ALTAIR])
@spec_state_test
def test_inactivity_score(spec, state):
assert spec.config.INACTIVITY_SCORE_BIAS <= spec.config.INACTIVITY_SCORE_RECOVERY_RATE

View File

@@ -47,3 +47,9 @@ def test_incentives(spec, state):
@spec_state_test
def test_time(spec, state):
assert spec.SLOTS_PER_EPOCH <= spec.SLOTS_PER_HISTORICAL_ROOT
@with_all_phases
@spec_state_test
def test_networking(spec, state):
assert spec.RANDOM_SUBNETS_PER_VALIDATOR <= spec.ATTESTATION_SUBNET_COUNT