mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-17 13:06:34 +00:00
Merge pull request #3743 from fradamt/dev
Add .copy() where needed in tests
This commit is contained in:
commit
871c772e3f
@ -774,7 +774,7 @@ def run_execution_layer_withdrawal_request_processing(
|
|||||||
pre_pending_partial_withdrawals = state.pending_partial_withdrawals.copy()
|
pre_pending_partial_withdrawals = state.pending_partial_withdrawals.copy()
|
||||||
pre_balance = state.balances[validator_index]
|
pre_balance = state.balances[validator_index]
|
||||||
pre_effective_balance = state.validators[validator_index].effective_balance
|
pre_effective_balance = state.validators[validator_index].effective_balance
|
||||||
pre_state = state
|
pre_state = state.copy()
|
||||||
expected_amount_to_withdraw = compute_amount_to_withdraw(
|
expected_amount_to_withdraw = compute_amount_to_withdraw(
|
||||||
spec, state, validator_index, execution_layer_withdrawal_request.amount
|
spec, state, validator_index, execution_layer_withdrawal_request.amount
|
||||||
)
|
)
|
||||||
|
@ -95,7 +95,7 @@ def test_multiple_pending_deposits_below_churn(spec, state):
|
|||||||
state.pending_balance_deposits.append(
|
state.pending_balance_deposits.append(
|
||||||
spec.PendingBalanceDeposit(index=1, amount=amount)
|
spec.PendingBalanceDeposit(index=1, amount=amount)
|
||||||
)
|
)
|
||||||
pre_balances = state.balances
|
pre_balances = state.balances.copy()
|
||||||
yield from run_epoch_processing_with(
|
yield from run_epoch_processing_with(
|
||||||
spec, state, "process_pending_balance_deposits"
|
spec, state, "process_pending_balance_deposits"
|
||||||
)
|
)
|
||||||
@ -115,7 +115,7 @@ def test_multiple_pending_deposits_above_churn(spec, state):
|
|||||||
state.pending_balance_deposits.append(
|
state.pending_balance_deposits.append(
|
||||||
spec.PendingBalanceDeposit(index=i, amount=amount)
|
spec.PendingBalanceDeposit(index=i, amount=amount)
|
||||||
)
|
)
|
||||||
pre_balances = state.balances
|
pre_balances = state.balances.copy()
|
||||||
yield from run_epoch_processing_with(
|
yield from run_epoch_processing_with(
|
||||||
spec, state, "process_pending_balance_deposits"
|
spec, state, "process_pending_balance_deposits"
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user