Skip to content

Commit

Permalink
fix get_inactivity_penalty function signature
Browse files Browse the repository at this point in the history
  • Loading branch information
djrtwo committed Mar 8, 2019
1 parent f88db44 commit 30e64d7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions specs/core/0_beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 30e64d7

Please sign in to comment.