From 1909d8f2694508a1fba04c78a55b7b2b6d485a38 Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Fri, 5 Oct 2018 14:24:02 +0200 Subject: [PATCH] Update slashing period key appropriately --- x/slashing/keys.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/slashing/keys.go b/x/slashing/keys.go index 1f84a285dd..183dfde60d 100644 --- a/x/slashing/keys.go +++ b/x/slashing/keys.go @@ -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...) }