Skip to content

Commit

Permalink
Update slashing period key appropriately
Browse files Browse the repository at this point in the history
  • Loading branch information
cwgoes committed Oct 5, 2018
1 parent 1f12f20 commit 1909d8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/slashing/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ func GetValidatorSlashingPeriodPrefix(v sdk.ConsAddress) []byte {
// stored by *Tendermint* address (not operator address) followed by start height
func GetValidatorSlashingPeriodKey(v sdk.ConsAddress, startHeight int64) []byte {
b := make([]byte, 8)
binary.LittleEndian.PutUint64(b, uint64(startHeight))
// this needs to be height + 1 because the slashing period for genesis validators starts at height -1
binary.LittleEndian.PutUint64(b, uint64(startHeight+1))
return append(GetValidatorSlashingPeriodPrefix(v), b...)
}

Expand Down

0 comments on commit 1909d8f

Please sign in to comment.