Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
expertdicer committed Apr 2, 2024
1 parent 5a0d065 commit ef7d0a3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
32 changes: 16 additions & 16 deletions app/fork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func TestFork(t *testing.T) {

vals := stakingKeeper.GetUnbondingValidators(ctx, timeKey, ForkHeight)
require.Equal(t, vals[0], duplicativeVal.OperatorAddress)

}

func checkDuplicateUBDQueue(ctx sdk.Context, realio RealioNetwork) bool {
Expand All @@ -91,13 +90,13 @@ func checkDuplicateUBDQueue(ctx sdk.Context, realio RealioNetwork) bool {
return false
}

func checkDuplicateUBD(eles []stakingtypes.DVPair) bool {
unique_eles := map[string]bool{}
for _, ele := range eles {
unique_eles[ele.String()] = true
func checkDuplicateUBD(eels []stakingtypes.DVPair) bool {
unique_eels := map[string]bool{}

Check warning on line 94 in app/fork_test.go

View workflow job for this annotation

GitHub Actions / lint

var-naming: don't use underscores in Go names; var unique_eels should be uniqueEels (revive)
for _, ele := range eels {
unique_eels[ele.String()] = true
}

return len(unique_eles) != len(eles)
return len(unique_eels) != len(eels)
}

func checkDuplicateRelegationQueue(ctx sdk.Context, realio RealioNetwork) bool {
Expand All @@ -115,13 +114,13 @@ func checkDuplicateRelegationQueue(ctx sdk.Context, realio RealioNetwork) bool {
return false
}

func checkDuplicateRedelegation(eles []stakingtypes.DVVTriplet) bool {
unique_eles := map[string]bool{}
for _, ele := range eles {
unique_eles[ele.String()] = true
func checkDuplicateRedelegation(eels []stakingtypes.DVVTriplet) bool {
unique_eels := map[string]bool{}

Check warning on line 118 in app/fork_test.go

View workflow job for this annotation

GitHub Actions / lint

var-naming: don't use underscores in Go names; var unique_eels should be uniqueEels (revive)
for _, ele := range eels {
unique_eels[ele.String()] = true
}

return len(unique_eles) != len(eles)
return len(unique_eels) != len(eels)
}

func checkDuplicateValQueue(ctx sdk.Context, realio RealioNetwork) bool {
Expand All @@ -138,11 +137,12 @@ func checkDuplicateValQueue(ctx sdk.Context, realio RealioNetwork) bool {
}
return false
}
func checkDuplicateValAddr(eles []string) bool {
unique_eles := map[string]bool{}
for _, ele := range eles {
unique_eles[ele] = true

func checkDuplicateValAddr(eels []string) bool {
unique_eels := map[string]bool{}

Check warning on line 142 in app/fork_test.go

View workflow job for this annotation

GitHub Actions / lint

var-naming: don't use underscores in Go names; var unique_eels should be uniqueEels (revive)
for _, ele := range eels {
unique_eels[ele] = true
}

return len(unique_eles) != len(eles)
return len(unique_eels) != len(eels)
}
9 changes: 5 additions & 4 deletions app/forks.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
)

var ForkHeight = int64(5989487)
var oneEnternityLater = time.Date(9999, 9, 9, 9, 9, 9, 9, time.UTC)
var (
ForkHeight = int64(5989487)
oneEnternityLater = time.Date(9999, 9, 9, 9, 9, 9, 9, time.UTC)
)

// ScheduleForkUpgrade executes any necessary fork logic for based upon the current
// block height and chain ID (mainnet or testnet). It sets an upgrade plan once
Expand Down Expand Up @@ -77,7 +79,6 @@ func removeDuplicateValueRedelegationQueueKey(app *RealioNetwork, ctx sdk.Contex

store.Set(redelegationTimesliceIterator.Key(), bz)
}

}

func removeDuplicateDVVTriplets(triplets []stakingtypes.DVVTriplet) []stakingtypes.DVVTriplet {
Expand Down Expand Up @@ -115,7 +116,7 @@ func removeDuplicateUnbondingValidator(app *RealioNetwork, ctx sdk.Context) {
}

unique_addrs := []string{}

Check warning on line 118 in app/forks.go

View workflow job for this annotation

GitHub Actions / lint

var-naming: don't use underscores in Go names; var unique_addrs should be uniqueAddrs (revive)
for valAddr, _ := range vals {
for valAddr := range vals {
unique_addrs = append(unique_addrs, valAddr)
}
sort.Strings(unique_addrs)
Expand Down
1 change: 0 additions & 1 deletion x/asset/keeper/msg_server_create_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func (k msgServer) CreateToken(goCtx context.Context, msg *types.MsgCreateToken)
coin := sdk.Coins{{Denom: baseDenom, Amount: canonicalAmount}}

err = k.bankKeeper.MintCoins(ctx, types.ModuleName, coin)

if err != nil {
panic(err)
}
Expand Down

0 comments on commit ef7d0a3

Please sign in to comment.