Skip to content

Commit

Permalink
tests(sequencer): Fixes the broken test `TestSlashingBondReducingSequ…
Browse files Browse the repository at this point in the history
…encer` (#1074)
  • Loading branch information
spoo-bar authored Aug 9, 2024
1 parent acd9d13 commit abe6bab
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions x/sequencer/keeper/slashing_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
package keeper_test

import (
"time"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/dymensionxyz/dymension/v3/x/sequencer/types"
)

func (s *SequencerTestSuite) TestSlashBasic() {
s.Run("slash at zero does not error", func() {
// There shouldn't be an error if the sequencer has no tokens
Expand All @@ -15,7 +23,7 @@ func (s *SequencerTestSuite) TestSlashBasic() {
})
}

func (suite *SequencerTestSuite) TestSlashingBondReducingSequencer() {
func (suite *SequencerTestSuite) TestSlashAndJailBondReducingSequencer() {
suite.SetupTest()
keeper := suite.App.SequencerKeeper

Expand All @@ -31,7 +39,7 @@ func (suite *SequencerTestSuite) TestSlashingBondReducingSequencer() {
bondReductions := keeper.GetMatureDecreasingBondSequencers(suite.Ctx, resp.GetCompletionTime())
suite.Require().Len(bondReductions, 1)

err = keeper.Slashing(suite.Ctx, seqAddr)
err = keeper.SlashAndJailFraud(suite.Ctx, seqAddr)
suite.NoError(err)

bondReductions = keeper.GetMatureDecreasingBondSequencers(suite.Ctx, resp.GetCompletionTime())
Expand Down

0 comments on commit abe6bab

Please sign in to comment.