chore: routine gofumpt (#12571)
## Description Routine gofumpting. No changelog entry because no changes to how the code functions. --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
This commit is contained in:
parent
dbcff8384f
commit
ee3f32dad0
@ -118,5 +118,4 @@ modules:
|
||||
"@type": testpb.TestNoGoImportModule
|
||||
`))
|
||||
expectContainerErrorContains(t, opt, "module should have ModuleDescriptor.go_import specified")
|
||||
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ require (
|
||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect
|
||||
golang.org/x/text v0.3.5 // indirect
|
||||
google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb // indirect
|
||||
google.golang.org/grpc v1.47.0 // indirect
|
||||
google.golang.org/grpc v1.48.0 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
)
|
||||
|
||||
@ -149,8 +149,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||
google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8=
|
||||
google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w=
|
||||
google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
|
||||
@ -93,8 +93,10 @@ func (s *InitTestSuite) setEnv(t *testing.T, env *cosmovisorInitEnv) {
|
||||
}
|
||||
}
|
||||
|
||||
var _ io.Reader = BufferedPipe{}
|
||||
var _ io.Writer = BufferedPipe{}
|
||||
var (
|
||||
_ io.Reader = BufferedPipe{}
|
||||
_ io.Writer = BufferedPipe{}
|
||||
)
|
||||
|
||||
// BufferedPipe contains a connected read/write pair of files (a pipe),
|
||||
// and a buffer of what goes through it that is populated in the background.
|
||||
|
||||
@ -488,7 +488,6 @@ func (app *SimApp) setAnteHandler(txConfig client.TxConfig) {
|
||||
SigGasConsumer: ante.DefaultSigVerificationGasConsumer,
|
||||
},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@ -10,10 +10,8 @@ import (
|
||||
dbm "github.com/tendermint/tm-db"
|
||||
)
|
||||
|
||||
var (
|
||||
// This is set at compile time. Could be cleveldb, defaults is goleveldb.
|
||||
backend = dbm.GoLevelDBBackend
|
||||
)
|
||||
// This is set at compile time. Could be cleveldb, defaults is goleveldb.
|
||||
var backend = dbm.GoLevelDBBackend
|
||||
|
||||
// SortedJSON takes any JSON and returns it sorted by keys. Also, all white-spaces
|
||||
// are removed.
|
||||
|
||||
@ -206,7 +206,6 @@ func (suite *AnteTestSuite) TestSigVerification() {
|
||||
// In the meantime, we want to make double-sure amino compatibility works.
|
||||
// ref: https://github.com/cosmos/cosmos-sdk/issues/7229
|
||||
func (suite *AnteTestSuite) TestSigVerification_ExplicitAmino() {
|
||||
|
||||
// Set up TxConfig.
|
||||
aminoCdc := codec.NewLegacyAmino()
|
||||
// We're using TestMsg amino encoding in some tests, so register it here.
|
||||
|
||||
@ -79,7 +79,6 @@ func NewAccountKeeper(
|
||||
cdc codec.BinaryCodec, storeKey storetypes.StoreKey, proto func() types.AccountI,
|
||||
maccPerms map[string][]string, bech32Prefix string, authority string,
|
||||
) AccountKeeper {
|
||||
|
||||
permAddrs := make(map[string]types.PermissionsForAddress)
|
||||
for name, perms := range maccPerms {
|
||||
permAddrs[name] = types.NewPermissionsForAddress(name, perms)
|
||||
|
||||
@ -139,7 +139,6 @@ func (suite *KeeperTestSuite) TestGetSetParams() {
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestSupply_ValidatePermissions() {
|
||||
|
||||
err := suite.accountKeeper.ValidatePermissions(multiPermAcc)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
|
||||
@ -78,7 +78,6 @@ func TestMigrateVestingAccounts(t *testing.T) {
|
||||
{
|
||||
"delayed vesting has vested, multiple delegations less than the total account balance",
|
||||
func(ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) {
|
||||
|
||||
baseAccount := authtypes.NewBaseAccountWithAddress(delegatorAddr)
|
||||
vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(200)))
|
||||
delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().Unix())
|
||||
@ -590,7 +589,6 @@ func TestMigrateVestingAccounts(t *testing.T) {
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
|
||||
err := accountKeeper.SetParams(ctx, authtypes.DefaultParams())
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -652,7 +650,6 @@ func trackingCorrected(ctx sdk.Context, t *testing.T, ak keeper.AccountKeeper, a
|
||||
}
|
||||
|
||||
func cleartTrackingFields(ctx sdk.Context, vesting exported.VestingAccount, accountKeeper keeper.AccountKeeper) error {
|
||||
|
||||
switch t := vesting.(type) {
|
||||
case *types.DelayedVestingAccount:
|
||||
t.DelegatedFree = nil
|
||||
@ -674,7 +671,6 @@ func cleartTrackingFields(ctx sdk.Context, vesting exported.VestingAccount, acco
|
||||
}
|
||||
|
||||
func dirtyTrackingFields(ctx sdk.Context, vesting exported.VestingAccount, accountKeeper keeper.AccountKeeper) error {
|
||||
|
||||
dirt := sdk.NewCoins(sdk.NewInt64Coin("stake", 42))
|
||||
|
||||
switch t := vesting.(type) {
|
||||
@ -698,7 +694,6 @@ func dirtyTrackingFields(ctx sdk.Context, vesting exported.VestingAccount, accou
|
||||
}
|
||||
|
||||
func createValidator(t *testing.T, ctx sdk.Context, bankKeeper bankkeeper.Keeper, stakingKeeper *stakingkeeper.Keeper, powers int64) (sdk.AccAddress, sdk.ValAddress) {
|
||||
|
||||
valTokens := sdk.TokensFromConsensusPower(powers, sdk.DefaultPowerReduction)
|
||||
addrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 1, valTokens)
|
||||
valAddrs := simtestutil.ConvertAddrsToValAddrs(addrs)
|
||||
|
||||
@ -43,9 +43,7 @@ func TestMigrateMapAccAddressToAccNumberKey(t *testing.T) {
|
||||
ctx := testutil.DefaultContext(storeKey, tKey)
|
||||
store := ctx.KVStore(storeKey)
|
||||
|
||||
var (
|
||||
accountKeeper keeper.AccountKeeper
|
||||
)
|
||||
var accountKeeper keeper.AccountKeeper
|
||||
|
||||
app, err := simtestutil.Setup(
|
||||
authtestutil.AppConfig,
|
||||
|
||||
@ -11,9 +11,7 @@ const (
|
||||
ModuleName = "auth"
|
||||
)
|
||||
|
||||
var (
|
||||
ParamsKey = []byte{0x01}
|
||||
)
|
||||
var ParamsKey = []byte{0x01}
|
||||
|
||||
// Migrate migrates the x/auth module state from the consensus version 3 to
|
||||
// version 4. Specifically, it takes the parameters that are currently stored
|
||||
@ -31,5 +29,4 @@ func Migrate(ctx sdk.Context, store sdk.KVStore, legacySubspace exported.Subspac
|
||||
store.Set(ParamsKey, bz)
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
@ -37,7 +37,6 @@ func NewKeeper(
|
||||
cdc codec.BinaryCodec, storeKey storetypes.StoreKey, invCheckPeriod uint,
|
||||
supplyKeeper types.SupplyKeeper, feeCollectorName string, authority string,
|
||||
) *Keeper {
|
||||
|
||||
return &Keeper{
|
||||
storeKey: storeKey,
|
||||
cdc: cdc,
|
||||
|
||||
@ -7,6 +7,4 @@ const (
|
||||
StoreKey = ModuleName
|
||||
)
|
||||
|
||||
var (
|
||||
ConstantFeeKey = []byte{0x01}
|
||||
)
|
||||
var ConstantFeeKey = []byte{0x01}
|
||||
|
||||
@ -12,9 +12,7 @@ const (
|
||||
ModuleName = "distribution"
|
||||
)
|
||||
|
||||
var (
|
||||
ParamsKey = []byte{0x09}
|
||||
)
|
||||
var ParamsKey = []byte{0x09}
|
||||
|
||||
// MigrateStore migrates the x/distribution module state from the consensus version 2 to
|
||||
// version 3. Specifically, it takes the parameters that are currently stored
|
||||
|
||||
@ -18,6 +18,4 @@ import (
|
||||
//go:embed app.yaml
|
||||
var appConfig []byte
|
||||
|
||||
var (
|
||||
AppConfig = appconfig.LoadYAML(appConfig)
|
||||
)
|
||||
var AppConfig = appconfig.LoadYAML(appConfig)
|
||||
|
||||
@ -11,9 +11,7 @@ const (
|
||||
ModuleName = "mint"
|
||||
)
|
||||
|
||||
var (
|
||||
ParamsKey = []byte{0x01}
|
||||
)
|
||||
var ParamsKey = []byte{0x01}
|
||||
|
||||
// Migrate migrates the x/mint module state from the consensus version 1 to
|
||||
// version 2. Specifically, it takes the parameters that are currently stored
|
||||
|
||||
@ -213,7 +213,7 @@ type subspaceInputs struct {
|
||||
|
||||
func provideSubspace(in subspaceInputs) types.Subspace {
|
||||
moduleName := in.Key.Name()
|
||||
var kt, exists = in.KeyTables[moduleName]
|
||||
kt, exists := in.KeyTables[moduleName]
|
||||
if !exists {
|
||||
return in.Keeper.Subspace(moduleName)
|
||||
} else {
|
||||
|
||||
@ -26,7 +26,6 @@ type Keeper struct {
|
||||
|
||||
// NewKeeper creates a slashing keeper
|
||||
func NewKeeper(cdc codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key storetypes.StoreKey, sk types.StakingKeeper, authority string) Keeper {
|
||||
|
||||
return Keeper{
|
||||
storeKey: key,
|
||||
cdc: cdc,
|
||||
|
||||
@ -11,9 +11,7 @@ const (
|
||||
ModuleName = "slashing"
|
||||
)
|
||||
|
||||
var (
|
||||
ParamsKey = []byte{0x00}
|
||||
)
|
||||
var ParamsKey = []byte{0x00}
|
||||
|
||||
// Migrate migrates the x/slashing module state from the consensus version 2 to
|
||||
// version 3. Specifically, it takes the parameters that are currently stored
|
||||
|
||||
Loading…
Reference in New Issue
Block a user