Merge pull request #996 from ethereum/return_tuple

`_deltas` functions should return `Tuple` instead of `List`
This commit is contained in:
Danny Ryan 2019-04-26 08:44:51 -06:00 committed by GitHub
commit b69423f29b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1502,7 +1502,7 @@ def get_attestation_deltas(state: BeaconState) -> Tuple[List[Gwei], List[Gwei]]:
if index not in matching_target_attesting_indices: if index not in matching_target_attesting_indices:
penalties[index] += state.validator_registry[index].effective_balance * finality_delay // INACTIVITY_PENALTY_QUOTIENT penalties[index] += state.validator_registry[index].effective_balance * finality_delay // INACTIVITY_PENALTY_QUOTIENT
return [rewards, penalties] return rewards, penalties
``` ```
```python ```python
@ -1521,7 +1521,7 @@ def get_crosslink_deltas(state: BeaconState) -> Tuple[List[Gwei], List[Gwei]]:
rewards[index] += base_reward * attesting_balance // committee_balance rewards[index] += base_reward * attesting_balance // committee_balance
else: else:
penalties[index] += base_reward penalties[index] += base_reward
return [rewards, penalties] return rewards, penalties
``` ```
Run the following function: Run the following function: