This commit is contained in:
Potuz
2022-11-10 08:47:16 -03:00
parent 3d82a19b3b
commit c7d733303f

View File

@@ -33,7 +33,8 @@ def verify_post_state(state, spec, expected_withdrawals,
expected_withdrawals_validator_indices = [withdrawal.validator_index for withdrawal in expected_withdrawals]
assert state.next_withdrawal_index == expected_withdrawals[-1].index + 1
assert state.next_withdrawal_validator_index == (expected_withdrawals_validator_indices[-1]+1) % len(state.validators)
next_withdrawal_validator_index = (expected_withdrawals_validator_indices[-1] + 1) % len(state.validators)
assert state.next_withdrawal_validator_index == next_withdrawal_validator_index
for index in fully_withdrawable_indices:
if index in expected_withdrawals_validator_indices:
assert state.balances[index] == 0
@@ -96,6 +97,7 @@ def test_success_zero_expected_withdrawals(spec, state):
yield from run_withdrawals_processing(spec, state, execution_payload)
@with_capella_and_later
@spec_state_test
def test_success_one_full_withdrawal(spec, state):