Skip to content

Commit

Permalink
Fix slashing test to reflect SlashFractionDowntime param
Browse files Browse the repository at this point in the history
  • Loading branch information
jaekwon committed Jul 25, 2018
1 parent 90f55a6 commit a86fcdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/slashing/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down

0 comments on commit a86fcdc

Please sign in to comment.