mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-11 11:14:17 +00:00
clean up unused argument from phase0
This commit is contained in:
parent
fd27d93898
commit
2b45496fe4
@ -521,7 +521,7 @@ def process_deposit(state: BeaconState, deposit: Deposit) -> None:
|
||||
signing_root = compute_signing_root(deposit_message, domain)
|
||||
# Initialize validator if the deposit signature is valid
|
||||
if bls.Verify(pubkey, signing_root, deposit.data.signature):
|
||||
state.validators.append(get_validator_from_deposit(state, deposit))
|
||||
state.validators.append(get_validator_from_deposit(deposit))
|
||||
state.balances.append(amount)
|
||||
state.previous_epoch_participation.append(ParticipationFlags(0b0000_0000))
|
||||
state.current_epoch_participation.append(ParticipationFlags(0b0000_0000))
|
||||
|
@ -1832,7 +1832,7 @@ def process_attestation(state: BeaconState, attestation: Attestation) -> None:
|
||||
##### Deposits
|
||||
|
||||
```python
|
||||
def get_validator_from_deposit(state: BeaconState, deposit: Deposit) -> Validator:
|
||||
def get_validator_from_deposit(deposit: Deposit) -> Validator:
|
||||
amount = deposit.data.amount
|
||||
effective_balance = min(amount - amount % EFFECTIVE_BALANCE_INCREMENT, MAX_EFFECTIVE_BALANCE)
|
||||
|
||||
@ -1877,7 +1877,7 @@ def process_deposit(state: BeaconState, deposit: Deposit) -> None:
|
||||
return
|
||||
|
||||
# Add validator and balance entries
|
||||
state.validators.append(get_validator_from_deposit(state, deposit))
|
||||
state.validators.append(get_validator_from_deposit(deposit))
|
||||
state.balances.append(amount)
|
||||
else:
|
||||
# Increase balance by deposit amount
|
||||
|
Loading…
x
Reference in New Issue
Block a user