mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-12 11:44:41 +00:00
ensure rewards spec test with exited validators
This commit is contained in:
parent
0cc5f9cd59
commit
58c0da9059
@ -37,6 +37,20 @@ def test_full_random_3(spec, state):
|
|||||||
yield from rewards_helpers.run_test_full_random(spec, state, rng=Random(4040))
|
yield from rewards_helpers.run_test_full_random(spec, state, rng=Random(4040))
|
||||||
|
|
||||||
|
|
||||||
|
@with_all_phases
|
||||||
|
@spec_state_test
|
||||||
|
def test_full_random_4(spec, state):
|
||||||
|
"""
|
||||||
|
Ensure a rewards test with some exited (but not slashed) validators.
|
||||||
|
"""
|
||||||
|
rng = Random(5050)
|
||||||
|
randomize_state(spec, state, rng)
|
||||||
|
assert spec.is_in_inactivity_leak(state)
|
||||||
|
target_validators = get_unslashed_exited_validators(spec, state)
|
||||||
|
assert len(target_validators) != 0
|
||||||
|
yield from rewards_helpers.run_deltas(spec, state)
|
||||||
|
|
||||||
|
|
||||||
@with_all_phases
|
@with_all_phases
|
||||||
@with_custom_state(balances_fn=low_balances, threshold_fn=lambda spec: spec.config.EJECTION_BALANCE)
|
@with_custom_state(balances_fn=low_balances, threshold_fn=lambda spec: spec.config.EJECTION_BALANCE)
|
||||||
@spec_test
|
@spec_test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user