Minor fixes
This commit is contained in:
parent
fa3b459314
commit
034163c021
2
Makefile
2
Makefile
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue