preston's feedback
This commit is contained in:
parent
b2cd3ce9a7
commit
03071df6e3
|
@ -47,6 +47,22 @@ def test_apply_pending_deposit_not_withdrawable_epoch_while_exiting(spec, state)
|
|||
)
|
||||
assert spec.apply_pending_deposit(state,deposit) == False
|
||||
|
||||
@with_electra_and_later
|
||||
@spec_state_test
|
||||
def test_apply_pending_deposit_not_withdrawable_epoch_at_current_epoch_while_exiting(spec, state):
|
||||
amount = 100
|
||||
# validator exit epoch must be less than far future
|
||||
state.validators[0].exit_epoch = spec.FAR_FUTURE_EPOCH - 1
|
||||
state.validators[0].withdrawable_epoch = spec.get_current_epoch(state)
|
||||
|
||||
deposit = spec.PendingDeposit(
|
||||
pubkey=state.validators[0].pubkey,
|
||||
withdrawal_credentials= state.validators[0].withdrawal_credentials,
|
||||
amount=amount,
|
||||
slot=spec.GENESIS_SLOT,
|
||||
)
|
||||
assert spec.apply_pending_deposit(state,deposit) == False
|
||||
|
||||
@with_electra_and_later
|
||||
@spec_state_test
|
||||
def test_apply_pending_deposit_withdrawable_epoch_while_exiting(spec, state):
|
||||
|
@ -67,6 +83,7 @@ def test_apply_pending_deposit_withdrawable_epoch_while_exiting(spec, state):
|
|||
assert spec.apply_pending_deposit(state,deposit) == True
|
||||
assert state.balances[0] == amount
|
||||
|
||||
|
||||
@with_electra_and_later
|
||||
@spec_state_test
|
||||
def test_apply_pending_deposit_withdrawable_epoch_while_exited(spec, state):
|
||||
|
|
Loading…
Reference in New Issue