Apply PR feedback. Rename inbound_limit to activation_limit

This commit is contained in:
Hsiao-Wei Wang
2023-09-15 22:05:26 +08:00
parent 26d3fa3efd
commit e8041749a2

View File

@@ -61,7 +61,7 @@ def run_test_activation_churn_limit(spec, state):
@with_custom_state(balances_fn=scaled_churn_balances_exceed_activation_churn_limit,
threshold_fn=lambda spec: spec.config.EJECTION_BALANCE)
@single_phase
def test_activation_churn_limit__greater_than_inbound_limit(spec, state):
def test_activation_churn_limit__greater_than_activation_limit(spec, state):
assert spec.get_validator_activation_churn_limit(state) == spec.config.MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT
assert spec.get_validator_churn_limit(state) > spec.config.MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT
yield from run_test_activation_churn_limit(spec, state)
@@ -74,7 +74,7 @@ def test_activation_churn_limit__greater_than_inbound_limit(spec, state):
@with_custom_state(balances_fn=scaled_churn_balances_equal_activation_churn_limit,
threshold_fn=lambda spec: spec.config.EJECTION_BALANCE)
@single_phase
def test_activation_churn_limit__equal_to_inbound_limit(spec, state):
def test_activation_churn_limit__equal_to_activation_limit(spec, state):
assert spec.get_validator_activation_churn_limit(state) == spec.config.MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT
assert spec.get_validator_churn_limit(state) == spec.config.MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT
yield from run_test_activation_churn_limit(spec, state)
@@ -84,7 +84,7 @@ def test_activation_churn_limit__equal_to_inbound_limit(spec, state):
@with_presets([MINIMAL],
reason="mainnet config leads to larger validator set than limit of public/private keys pre-generated")
@spec_state_test
def test_activation_churn_limit__less_than_inbound_limit(spec, state):
def test_activation_churn_limit__less_than_activation_limit(spec, state):
assert spec.get_validator_activation_churn_limit(state) < spec.config.MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT
assert spec.get_validator_churn_limit(state) < spec.config.MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT
yield from run_test_activation_churn_limit(spec, state)