Apply suggestions from code review

Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
This commit is contained in:
Mikhail Kalinin 2023-02-28 16:14:47 +06:00 committed by GitHub
parent 9d690a4cb2
commit de5be63399
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ The following values are (non-configurable) constants used throughout the specif
| Name | Value |
| - | - |
| `NOT_SET_DEPOSIT_RECEIPTS_START_INDEX` | `2**64 - 1` |
| `NOT_SET_DEPOSIT_RECEIPTS_START_INDEX` | `uint64(2**64 - 1)` |
## Preset
@ -292,6 +292,7 @@ def process_deposit_receipt(state: BeaconState, deposit_receipt: DepositReceipt)
```python
def process_deposit(state: BeaconState, deposit: Deposit) -> None:
# [New in EIP-6110]
# Skip already processed deposits
if state.eth1_deposit_index >= state.deposit_receipts_start_index:
state.eth1_deposit_index += 1
@ -325,7 +326,6 @@ def process_deposit(state: BeaconState, deposit: Deposit) -> None:
if bls.Verify(pubkey, signing_root, deposit.data.signature):
state.validators.append(get_validator_from_deposit(deposit))
state.balances.append(amount)
# [New in Altair]
state.previous_epoch_participation.append(ParticipationFlags(0b0000_0000))
state.current_epoch_participation.append(ParticipationFlags(0b0000_0000))
state.inactivity_scores.append(uint64(0))