fix get_inactivity_penalty function signature

This commit is contained in:
Danny Ryan 2019-03-08 12:14:21 -07:00
parent f88db44e81
commit 30e64d7de6
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 1 additions and 2 deletions

View File

@ -1885,8 +1885,7 @@ def get_base_reward(state: BeaconState, index: ValidatorIndex) -> Gwei:
```
```python
def get_inactivity_penalty(state: BeaconState, index: ValidatorIndex) -> Gwei:
epochs_since_finality = get_current_epoch(state) + 1 - state.finalized_epoch
def get_inactivity_penalty(state: BeaconState, index: ValidatorIndex, epochs_since_finality: int) -> Gwei:
return (
get_base_reward(state, index) +
get_effective_balance(state, index) * epochs_since_finality // INACTIVITY_PENALTY_QUOTIENT // 2