Minor fixes

This commit is contained in:
Christopher Goes 2018-10-05 14:58:19 +02:00
parent fa3b459314
commit 034163c021
3 changed files with 4 additions and 2 deletions

View File

@ -164,7 +164,7 @@ test_sim_gaia_fast:
test_sim_gaia_multi_seed:
@echo "Running multi-seed Gaia simulation. This may take awhile!"
@sh scripts/multisim.sh 10
@bash scripts/multisim.sh 10
SIM_NUM_BLOCKS ?= 210
SIM_BLOCK_SIZE ?= 200

View File

@ -26,6 +26,8 @@ func TestHandleDoubleSign(t *testing.T) {
// initial setup
ctx, ck, sk, _, keeper := createTestInput(t)
// validator added pre-genesis
ctx = ctx.WithBlockHeight(-1)
sk = sk.WithHooks(keeper.Hooks())
amtInt := int64(100)
operatorAddr, val, amt := addrs[0], pks[0], sdk.NewInt(amtInt)

View File

@ -68,7 +68,7 @@ func (k Keeper) unmarshalSlashingPeriodKeyValue(key []byte, value []byte) Valida
var slashingPeriodValue ValidatorSlashingPeriodValue
k.cdc.MustUnmarshalBinary(value, &slashingPeriodValue)
address := sdk.ConsAddress(key[1 : 1+sdk.AddrLen])
startHeight := int64(binary.LittleEndian.Uint64(key[1+sdk.AddrLen : 1+sdk.AddrLen+8]))
startHeight := int64(binary.LittleEndian.Uint64(key[1+sdk.AddrLen:1+sdk.AddrLen+8]) - 1)
return ValidatorSlashingPeriod{
ValidatorAddr: address,
StartHeight: startHeight,