Add `test_fork_has_compounding_withdrawal_credential` test case
This commit is contained in:
parent
5f48840f4d
commit
01a2c7ba07
|
@ -80,3 +80,17 @@ def test_fork_random_misc_balances(spec, phases, state):
|
|||
@with_meta_tags(ELECTRA_FORK_TEST_META_TAGS)
|
||||
def test_fork_random_large_validator_set(spec, phases, state):
|
||||
yield from run_fork_test(phases[ELECTRA], state)
|
||||
|
||||
|
||||
@with_phases(phases=[DENEB], other_phases=[ELECTRA])
|
||||
@spec_test
|
||||
@with_state
|
||||
@with_meta_tags(ELECTRA_FORK_TEST_META_TAGS)
|
||||
def test_fork_has_compounding_withdrawal_credential(spec, phases, state):
|
||||
post_spec = phases[ELECTRA]
|
||||
validator = state.validators[0]
|
||||
state.balances[0] = post_spec.MIN_ACTIVATION_BALANCE + 1
|
||||
validator.withdrawal_credentials = post_spec.COMPOUNDING_WITHDRAWAL_PREFIX + validator.withdrawal_credentials[1:]
|
||||
post_state = yield from run_fork_test(post_spec, state)
|
||||
|
||||
assert len(post_state.pending_balance_deposits) > 0
|
||||
|
|
|
@ -63,3 +63,5 @@ def run_fork_test(post_spec, pre_state):
|
|||
assert post_state.fork.epoch == post_spec.get_current_epoch(post_state)
|
||||
|
||||
yield 'post', post_state
|
||||
|
||||
return post_state
|
||||
|
|
Loading…
Reference in New Issue