fix `test_top_up_and_partial_withdrawable_validator`: set different expected value for post-electra
This commit is contained in:
parent
2ecbe194f7
commit
b290ec7d0c
|
@ -359,13 +359,13 @@ def test_top_up_and_partial_withdrawable_validator(spec, state):
|
|||
|
||||
signed_block = state_transition_and_sign_block(spec, state, block)
|
||||
|
||||
# ensure we go through an epoch transition, to account for post-electra behavior
|
||||
block_in_next_epoch = build_empty_block(spec, state, slot=state.slot + spec.SLOTS_PER_EPOCH)
|
||||
signed_block_in_next_epoch = state_transition_and_sign_block(spec, state, block_in_next_epoch)
|
||||
|
||||
yield 'blocks', [signed_block, signed_block_in_next_epoch]
|
||||
yield 'blocks', [signed_block]
|
||||
yield 'post', state
|
||||
|
||||
if is_post_electra(spec):
|
||||
assert state.pending_balance_deposits[0].amount == amount
|
||||
assert state.pending_balance_deposits[0].index == validator_index
|
||||
else:
|
||||
# Since withdrawals happen before deposits, it becomes partially withdrawable after state transition.
|
||||
validator = state.validators[validator_index]
|
||||
balance = state.balances[validator_index]
|
||||
|
|
Loading…
Reference in New Issue