mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-03 06:13:31 +00:00
Preserve deposits per epoch boundary
This commit is contained in:
parent
c53ab45e19
commit
b3c771c46d
@ -244,10 +244,14 @@ def process_pending_deposits(state: BeaconState) -> None:
|
|||||||
|
|
||||||
next_pending_deposit_index = 0
|
next_pending_deposit_index = 0
|
||||||
for pending_deposit in state.pending_deposits:
|
for pending_deposit in state.pending_deposits:
|
||||||
# Apply only finalized deposits
|
# Preserve deposits per epoch boundary
|
||||||
if pending_deposit.epoch > finalized_epoch
|
if next_pending_deposit_index >= MAX_DEPOSITS * SLOTS_PER_EPOCH:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
# Apply only finalized deposits
|
||||||
|
if pending_deposit.epoch > finalized_epoch:
|
||||||
|
break
|
||||||
|
|
||||||
# Skip already applied deposits
|
# Skip already applied deposits
|
||||||
if pending_deposit.index >= state.eth1_deposit_index:
|
if pending_deposit.index >= state.eth1_deposit_index:
|
||||||
apply_pending_deposit(state, pending_deposit)
|
apply_pending_deposit(state, pending_deposit)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user