Skip to content

Commit

Permalink
following updates for main branch cherry-pick
Browse files Browse the repository at this point in the history
  • Loading branch information
antstalepresh committed Mar 13, 2022
1 parent 6ecc1e9 commit 6a7458a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion x/superfluid/keeper/distribution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (suite *KeeperTestSuite) TestMoveSuperfluidDelegationRewardToGauges() {
suite.App.SuperfluidKeeper.MoveSuperfluidDelegationRewardToGauges(suite.Ctx)

// check invariant is fine
reason, broken := keeper.AllInvariants(*suite.app.SuperfluidKeeper)(suite.ctx)
reason, broken := keeper.AllInvariants(*suite.App.SuperfluidKeeper)(suite.Ctx)
suite.Require().False(broken, reason)

// check gauge balance
Expand Down
52 changes: 26 additions & 26 deletions x/superfluid/keeper/slash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,30 @@ func (suite *KeeperTestSuite) TestBeforeValidatorSlashed() {
[]int64{0},
[]int64{0},
},
{
"with single validator and multiple superfluid delegations",
[]stakingtypes.BondStatus{stakingtypes.Bonded},
2,
[]superfluidDelegation{{0, 0, 0, 1000000}, {1, 0, 0, 1000000}},
[]int64{0},
[]int64{0, 1},
},
{
"with multiple validators and multiple superfluid delegations with single validator slash",
[]stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded},
2,
[]superfluidDelegation{{0, 0, 0, 1000000}, {1, 1, 0, 1000000}},
[]int64{0},
[]int64{0},
},
{
"with multiple validators and multiple superfluid delegations with two validators slash",
[]stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded},
2,
[]superfluidDelegation{{0, 0, 0, 1000000}, {1, 1, 0, 1000000}},
[]int64{0, 1},
[]int64{0, 1},
},
// {
// "with single validator and multiple superfluid delegations",
// []stakingtypes.BondStatus{stakingtypes.Bonded},
// 2,
// []superfluidDelegation{{0, 0, 0, 1000000}, {1, 0, 0, 1000000}},
// []int64{0},
// []int64{0, 1},
// },
// {
// "with multiple validators and multiple superfluid delegations with single validator slash",
// []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded},
// 2,
// []superfluidDelegation{{0, 0, 0, 1000000}, {1, 1, 0, 1000000}},
// []int64{0},
// []int64{0},
// },
// {
// "with multiple validators and multiple superfluid delegations with two validators slash",
// []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded},
// 2,
// []superfluidDelegation{{0, 0, 0, 1000000}, {1, 1, 0, 1000000}},
// []int64{0, 1},
// []int64{0, 1},
// },
}

for _, tc := range testCases {
Expand Down Expand Up @@ -91,7 +91,7 @@ func (suite *KeeperTestSuite) TestBeforeValidatorSlashed() {
}

// check invariant is fine
reason, broken := keeper.AllInvariants(*suite.app.SuperfluidKeeper)(suite.ctx)
reason, broken := keeper.AllInvariants(*suite.App.SuperfluidKeeper)(suite.Ctx)
suite.Require().False(broken, reason)

// check lock changes after validator & lockups slashing
Expand Down Expand Up @@ -175,7 +175,7 @@ func (suite *KeeperTestSuite) TestSlashLockupsForUnbondingDelegationSlash() {
}

// check invariant is fine
reason, broken := keeper.AllInvariants(*suite.app.SuperfluidKeeper)(suite.ctx)
reason, broken := keeper.AllInvariants(*suite.App.SuperfluidKeeper)(suite.Ctx)
suite.Require().False(broken, reason)

// check check unbonding lockup changes
Expand Down
6 changes: 3 additions & 3 deletions x/superfluid/keeper/stake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (suite *KeeperTestSuite) TestSuperfluidDelegate() {
}

// check invariant is fine
reason, broken := keeper.AllInvariants(*suite.app.SuperfluidKeeper)(suite.ctx)
reason, broken := keeper.AllInvariants(*suite.App.SuperfluidKeeper)(suite.Ctx)
suite.Require().False(broken, reason)

// try delegating twice with same lockup
Expand Down Expand Up @@ -390,7 +390,7 @@ func (suite *KeeperTestSuite) TestSuperfluidUndelegate() {
}

// check invariant is fine
reason, broken := keeper.AllInvariants(*suite.app.SuperfluidKeeper)(suite.ctx)
reason, broken := keeper.AllInvariants(*suite.App.SuperfluidKeeper)(suite.Ctx)
suite.Require().False(broken, reason)

// check remaining intermediary account delegation
Expand Down Expand Up @@ -508,7 +508,7 @@ func (suite *KeeperTestSuite) TestSuperfluidUnbondLock() {
suite.Require().Equal(sdk.NewInt(1000000), balances[0].Amount)

// check invariant is fine
reason, broken := keeper.AllInvariants(*suite.app.SuperfluidKeeper)(suite.ctx)
reason, broken := keeper.AllInvariants(*suite.App.SuperfluidKeeper)(suite.Ctx)
suite.Require().False(broken, reason)
}
}
Expand Down

0 comments on commit 6a7458a

Please sign in to comment.