Fix slashing test to reflect SlashFractionDowntime param

This commit is contained in:
Jae Kwon 2018-07-25 16:24:41 -07:00
parent 90f55a6c42
commit a86fcdc88f
1 changed files with 2 additions and 1 deletions

View File

@ -129,7 +129,8 @@ func TestHandleAbsentValidator(t *testing.T) {
// validator should have been slashed
pool = sk.GetPool(ctx)
require.Equal(t, int64(amtInt-1), pool.BondedTokens.RoundInt64())
slashAmt := sdk.NewRat(amtInt).Mul(SlashFractionDowntime).RoundInt64()
require.Equal(t, int64(amtInt)-slashAmt, pool.BondedTokens.RoundInt64())
// validator start height should have been changed
info, found = keeper.getValidatorSigningInfo(ctx, sdk.ValAddress(val.Address()))