Merge pull request #3743 from fradamt/dev

Add .copy() where needed in tests
This commit is contained in:
Hsiao-Wei Wang 2024-05-06 15:49:57 +08:00 committed by GitHub
commit 871c772e3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -774,7 +774,7 @@ def run_execution_layer_withdrawal_request_processing(
pre_pending_partial_withdrawals = state.pending_partial_withdrawals.copy()
pre_balance = state.balances[validator_index]
pre_effective_balance = state.validators[validator_index].effective_balance
pre_state = state
pre_state = state.copy()
expected_amount_to_withdraw = compute_amount_to_withdraw(
spec, state, validator_index, execution_layer_withdrawal_request.amount
)

View File

@ -95,7 +95,7 @@ def test_multiple_pending_deposits_below_churn(spec, state):
state.pending_balance_deposits.append(
spec.PendingBalanceDeposit(index=1, amount=amount)
)
pre_balances = state.balances
pre_balances = state.balances.copy()
yield from run_epoch_processing_with(
spec, state, "process_pending_balance_deposits"
)
@ -115,7 +115,7 @@ def test_multiple_pending_deposits_above_churn(spec, state):
state.pending_balance_deposits.append(
spec.PendingBalanceDeposit(index=i, amount=amount)
)
pre_balances = state.balances
pre_balances = state.balances.copy()
yield from run_epoch_processing_with(
spec, state, "process_pending_balance_deposits"
)