From d0133796288e893c3c69cc21f4a01c80a7de5ecb Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Wed, 19 Oct 2022 10:27:01 -0500 Subject: [PATCH] Ensure `validator_index` is in validator set --- .../test/capella/block_processing/test_process_withdrawals.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_withdrawals.py b/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_withdrawals.py index 73ee9fb39..9bf70b56d 100644 --- a/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_withdrawals.py +++ b/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_withdrawals.py @@ -9,11 +9,11 @@ from eth2spec.test.helpers.state import next_slot def prepare_withdrawal_queue(spec, state, num_withdrawals): pre_queue_len = len(state.withdrawal_queue) - + validator_len = len(state.validators) for i in range(num_withdrawals): withdrawal = spec.Withdrawal( index=i + 5, - validator_index=i + 1000, + validator_index=(i + 1000) % validator_len, address=b'\x42' * 20, amount=200000 + i, )