Skip to content

Commit

Permalink
gofumpt matienance (#1948)
Browse files Browse the repository at this point in the history
  • Loading branch information
faddat authored Jul 3, 2022
1 parent 197a9b1 commit 8f018a6
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 18 deletions.
2 changes: 0 additions & 2 deletions tests/e2e/e2e_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,7 @@ func (s *IntegrationTestSuite) upgrade() {
}

func (s *IntegrationTestSuite) upgradeFork() {

for _, chainConfig := range s.chainConfigs {

for i := range chainConfig.validators {
validatorResource, exists := s.containerManager.GetValidatorResource(chainConfig.meta.Id, i)
require.True(s.T(), exists)
Expand Down
3 changes: 2 additions & 1 deletion x/epochs/keeper/epoch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ func (suite *KeeperTestSuite) TestAddEpochInfo() {
CurrentEpochStartHeight: startBlockHeight,
CurrentEpochStartTime: time.Time{},
EpochCountingStarted: false,
}},
},
},
"zero_duration": {
addedEpochInfo: types.EpochInfo{
Identifier: defaultIdentifier,
Expand Down
1 change: 0 additions & 1 deletion x/gamm/pool-models/balancer/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,6 @@ func (suite *BalancerTestSuite) TestBalancerCalculateAmountOutAndIn_InverseRelat

sut := func() {
suite.TestCalculateAmountOutAndIn_InverseRelationship(ctx, pool, poolAssetIn.Token.Denom, poolAssetOut.Token.Denom, tc.initialCalcOut, swapFeeDec)

}

balancerPool, ok := pool.(*balancer.Pool)
Expand Down
6 changes: 2 additions & 4 deletions x/mint/keeper/hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,7 @@ func TestAfterEpochEnd_FirstYearThirdening_RealParameters(t *testing.T) {
developerAccountBalance = 225_000_000_000_000
)

var (
reductionFactor = sdk.NewDec(2).Quo(sdk.NewDec(3))
)
reductionFactor := sdk.NewDec(2).Quo(sdk.NewDec(3))

app := osmoapp.Setup(false)
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
Expand All @@ -256,7 +254,7 @@ func TestAfterEpochEnd_FirstYearThirdening_RealParameters(t *testing.T) {
Staking: sdk.NewDecWithPrec(25, 2),
PoolIncentives: sdk.NewDecWithPrec(45, 2),
DeveloperRewards: sdk.NewDecWithPrec(25, 2),
CommunityPool: sdk.NewDecWithPrec(05, 2),
CommunityPool: sdk.NewDecWithPrec(0o5, 2),
},
WeightedDeveloperRewardsReceivers: []types.WeightedAddress{
{
Expand Down
2 changes: 1 addition & 1 deletion x/mint/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func (suite *KeeperTestSuite) TestSetInitialSupplyOffsetDuringMigration() {
isDeveloperModuleAccountCreated: true,
},
"dev vesting module account does not exist": {
blockHeight: 1,
blockHeight: 1,
expectedError: keeper.ErrDevVestingModuleAccountNotCreated,
},
}
Expand Down
2 changes: 1 addition & 1 deletion x/mint/simulation/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var (
Staking: sdk.NewDecWithPrec(25, 2),
PoolIncentives: sdk.NewDecWithPrec(45, 2),
DeveloperRewards: sdk.NewDecWithPrec(25, 2),
CommunityPool: sdk.NewDecWithPrec(05, 2),
CommunityPool: sdk.NewDecWithPrec(0o5, 2),
}
weightedDevRewardReceivers = []types.WeightedAddress{
{
Expand Down
1 change: 0 additions & 1 deletion x/mint/types/minter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ func BenchmarkNextEpochProvisions(b *testing.B) {
}

func TestMinterValidate(t *testing.T) {

testcases := []struct {
name string
minter types.Minter
Expand Down
6 changes: 4 additions & 2 deletions x/pool-incentives/keeper/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ type Hooks struct {
k Keeper
}

var _ gammtypes.GammHooks = Hooks{}
var _ minttypes.MintHooks = Hooks{}
var (
_ gammtypes.GammHooks = Hooks{}
_ minttypes.MintHooks = Hooks{}
)

// Create new pool incentives hooks.
func (k Keeper) Hooks() Hooks { return Hooks{k} }
Expand Down
1 change: 0 additions & 1 deletion x/superfluid/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ func GetCmdTotalDelegationByDelegator() *cobra.Command {
res, err := queryClient.TotalDelegationByDelegator(cmd.Context(), &types.QueryTotalDelegationByDelegatorRequest{
DelegatorAddress: args[0],
})

if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion x/superfluid/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ func (q Querier) TotalDelegationByDelegator(goCtx context.Context, req *types.Qu
TotalEquivalentStakedAmount: superfluidDelegationResp.TotalEquivalentStakedAmount,
}

//this is for getting normal staking
// this is for getting normal staking
q.sk.IterateDelegations(ctx, delAddr, func(_ int64, del stakingtypes.DelegationI) bool {
val, found := q.sk.GetValidator(ctx, del.GetValidatorAddr())
if !found {
Expand Down
4 changes: 1 addition & 3 deletions x/tokenfactory/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,4 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}

var (
ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
var ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())

0 comments on commit 8f018a6

Please sign in to comment.