Remove returned value for process_deposit

Also trim trailing whitespace
This commit is contained in:
Justin 2019-01-02 13:41:32 +00:00 committed by GitHub
parent 2105614059
commit 696bf23b5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 14 deletions

View File

@ -221,7 +221,6 @@ Unless otherwise indicated, code appearing in `this style` is to be interpreted
| `INITIATED_EXIT` | `2**0` (= 1) | | `INITIATED_EXIT` | `2**0` (= 1) |
| `WITHDRAWABLE` | `2**1` (= 2) | | `WITHDRAWABLE` | `2**1` (= 2) |
### Max operations per block ### Max operations per block
| Name | Value | | Name | Value |
@ -1264,7 +1263,7 @@ def process_deposit(state: BeaconState,
proof_of_possession: bytes, proof_of_possession: bytes,
withdrawal_credentials: Hash32, withdrawal_credentials: Hash32,
randao_commitment: Hash32, randao_commitment: Hash32,
poc_commitment: Hash32) -> int: poc_commitment: Hash32) -> None:
""" """
Process a deposit from Ethereum 1.0. Process a deposit from Ethereum 1.0.
Note that this function mutates ``state``. Note that this function mutates ``state``.
@ -1309,8 +1308,6 @@ def process_deposit(state: BeaconState,
assert state.validator_registry[index].withdrawal_credentials == withdrawal_credentials assert state.validator_registry[index].withdrawal_credentials == withdrawal_credentials
state.validator_balances[index] += amount state.validator_balances[index] += amount
return index
``` ```
### Routines for updating validator status ### Routines for updating validator status
@ -1592,7 +1589,6 @@ If `state.slot % POW_RECEIPT_ROOT_VOTING_PERIOD == 0`:
* Set `state.justification_bitfield |= 2` and `state.justified_slot = state.slot - 2 * EPOCH_LENGTH` if `3 * previous_epoch_boundary_attesting_balance >= 2 * total_balance`. * Set `state.justification_bitfield |= 2` and `state.justified_slot = state.slot - 2 * EPOCH_LENGTH` if `3 * previous_epoch_boundary_attesting_balance >= 2 * total_balance`.
* Set `state.justification_bitfield |= 1` and `state.justified_slot = state.slot - 1 * EPOCH_LENGTH` if `3 * current_epoch_boundary_attesting_balance >= 2 * total_balance`. * Set `state.justification_bitfield |= 1` and `state.justified_slot = state.slot - 1 * EPOCH_LENGTH` if `3 * current_epoch_boundary_attesting_balance >= 2 * total_balance`.
Set `state.finalized_slot = state.previous_justified_slot` if any of the following are true: Set `state.finalized_slot = state.previous_justified_slot` if any of the following are true:
* `state.previous_justified_slot == state.slot - 2 * EPOCH_LENGTH and state.justification_bitfield % 4 == 3` * `state.previous_justified_slot == state.slot - 2 * EPOCH_LENGTH and state.justification_bitfield % 4 == 3`
@ -1717,7 +1713,6 @@ def update_validator_registry(state: BeaconState) -> None:
# Exit validator # Exit validator
exit_validator(state, index) exit_validator(state, index)
state.validator_registry_latest_change_slot = state.slot state.validator_registry_latest_change_slot = state.slot
``` ```