Update slashing period key appropriately
This commit is contained in:
parent
1f12f204ce
commit
1909d8f269
|
@ -34,7 +34,8 @@ func GetValidatorSlashingPeriodPrefix(v sdk.ConsAddress) []byte {
|
||||||
// stored by *Tendermint* address (not operator address) followed by start height
|
// stored by *Tendermint* address (not operator address) followed by start height
|
||||||
func GetValidatorSlashingPeriodKey(v sdk.ConsAddress, startHeight int64) []byte {
|
func GetValidatorSlashingPeriodKey(v sdk.ConsAddress, startHeight int64) []byte {
|
||||||
b := make([]byte, 8)
|
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...)
|
return append(GetValidatorSlashingPeriodPrefix(v), b...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue