Do state.pending_deposits update in a single line

This commit is contained in:
Mikhail Kalinin 2024-08-27 17:46:43 +06:00
parent 22bb1de62d
commit 0526592fe8
1 changed files with 1 additions and 3 deletions

View File

@ -955,15 +955,13 @@ def process_pending_deposits(state: BeaconState) -> None:
# Regardless of how the deposit was handled, we move on in the queue.
next_deposit_index += 1
state.pending_deposits = state.pending_deposits[next_deposit_index:]
state.pending_deposits = state.pending_deposits[next_deposit_index:] + deposits_to_postpone
# Accumulate churn only if the churn limit has been hit.
if is_churn_limit_reached:
state.deposit_balance_to_consume = available_for_processing - processed_amount
else:
state.deposit_balance_to_consume = Gwei(0)
state.pending_deposits += deposits_to_postpone
```
#### New `process_pending_consolidations`