diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 00000000000..e5306c8dc57 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,9 @@ +# This configuration file was automatically generated by Gitpod. +# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file) +# and commit this file to your remote git repository to share the goodness with others. + +tasks: + - init: go get && go build ./... && go test ./... && make + command: go run + + diff --git a/ante/ante.go b/ante/ante.go index ae54c73794c..88e1bd779b9 100644 --- a/ante/ante.go +++ b/ante/ante.go @@ -28,7 +28,7 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) { return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder") } - var sigGasConsumer = opts.SigGasConsumer + sigGasConsumer := opts.SigGasConsumer if sigGasConsumer == nil { sigGasConsumer = ante.DefaultSigVerificationGasConsumer } diff --git a/app/app.go b/app/app.go index 8b2ee1b7cea..7ccbe14bf19 100644 --- a/app/app.go +++ b/app/app.go @@ -244,7 +244,6 @@ func NewGaiaApp( appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *GaiaApp { - appCodec := encodingConfig.Marshaler legacyAmino := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry @@ -629,7 +628,6 @@ func NewGaiaApp( app.UpgradeKeeper.SetUpgradeHandler( upgradeName, func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - fromVM[icatypes.ModuleName] = icaModule.ConsensusVersion() // create ICS27 Controller submodule params controllerParams := icacontrollertypes.Params{} diff --git a/cmd/gaiad/cmd/root.go b/cmd/gaiad/cmd/root.go index 111ad1e86b0..2f514d2c4fb 100644 --- a/cmd/gaiad/cmd/root.go +++ b/cmd/gaiad/cmd/root.go @@ -189,7 +189,6 @@ func (ac appCreator) newApp( traceStore io.Writer, appOpts servertypes.AppOptions, ) servertypes.Application { - var cache sdk.MultiStorePersistentCache if cast.ToBool(appOpts.Get(server.FlagInterBlockCache)) { @@ -245,7 +244,6 @@ func (ac appCreator) appExport( jailAllowedAddrs []string, appOpts servertypes.AppOptions, ) (servertypes.ExportedApp, error) { - homePath, ok := appOpts.Get(flags.FlagHome).(string) if !ok || homePath == "" { return servertypes.ExportedApp{}, errors.New("application home is not set") diff --git a/cmd/gaiad/cmd/testnet.go b/cmd/gaiad/cmd/testnet.go index 063f37fc5b4..b8d01f9b1e8 100644 --- a/cmd/gaiad/cmd/testnet.go +++ b/cmd/gaiad/cmd/testnet.go @@ -98,7 +98,7 @@ Example: return cmd } -const nodeDirPerm = 0755 +const nodeDirPerm = 0o755 // Initialize the testnet func InitTestnet( @@ -117,7 +117,6 @@ func InitTestnet( algoStr string, numValidators int, ) error { - if chainID == "" { chainID = "chain-" + tmrand.NewRand().Str(6) } @@ -281,7 +280,6 @@ func initGenFiles( genAccounts []authtypes.GenesisAccount, genBalances []banktypes.Balance, genFiles []string, numValidators int, ) error { - appGenState := mbm.DefaultGenesis(clientCtx.Codec) // set the accounts in the genesis state @@ -330,7 +328,6 @@ func collectGenFiles( nodeIDs []string, valPubKeys []cryptotypes.PubKey, numValidators int, outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator, ) error { - var appState json.RawMessage genTime := tmtime.Now() @@ -398,12 +395,12 @@ func calculateIP(ip string, i int) (string, error) { func writeFile(name string, dir string, contents []byte) error { file := filepath.Join(dir, name) - err := tmos.EnsureDir(dir, 0755) + err := tmos.EnsureDir(dir, 0o755) if err != nil { return err } - err = tmos.WriteFile(file, contents, 0644) + err = tmos.WriteFile(file, contents, 0o644) if err != nil { return err } diff --git a/tests/e2e/e2e_setup_test.go b/tests/e2e/e2e_setup_test.go index e7db4f57d02..1f9d7bb0873 100644 --- a/tests/e2e/e2e_setup_test.go +++ b/tests/e2e/e2e_setup_test.go @@ -336,7 +336,7 @@ func (s *IntegrationTestSuite) runIBCRelayer() { gaiaBVal := s.chainB.validators[0] hermesCfgPath := path.Join(tmpDir, "hermes") - s.Require().NoError(os.MkdirAll(hermesCfgPath, 0755)) + s.Require().NoError(os.MkdirAll(hermesCfgPath, 0o755)) _, err = copyFile( filepath.Join("./scripts/", "hermes_bootstrap.sh"), filepath.Join(hermesCfgPath, "hermes_bootstrap.sh"), diff --git a/tests/e2e/io.go b/tests/e2e/io.go index 97bfac75dce..9fa57132e25 100644 --- a/tests/e2e/io.go +++ b/tests/e2e/io.go @@ -39,5 +39,5 @@ func writeFile(path string, body []byte) error { return err } - return ioutil.WriteFile(path, body, 0600) + return ioutil.WriteFile(path, body, 0o600) } diff --git a/tests/e2e/validator.go b/tests/e2e/validator.go index e8a4d7a2aa3..2285a3a58fc 100644 --- a/tests/e2e/validator.go +++ b/tests/e2e/validator.go @@ -49,7 +49,7 @@ func (v *validator) configDir() string { func (v *validator) createConfig() error { p := path.Join(v.configDir(), "config") - return os.MkdirAll(p, 0755) + return os.MkdirAll(p, 0o755) } func (v *validator) init() error { @@ -109,12 +109,12 @@ func (v *validator) createConsensusKey() error { config.Moniker = v.moniker pvKeyFile := config.PrivValidatorKeyFile() - if err := tmos.EnsureDir(filepath.Dir(pvKeyFile), 0777); err != nil { + if err := tmos.EnsureDir(filepath.Dir(pvKeyFile), 0o777); err != nil { return err } pvStateFile := config.PrivValidatorStateFile() - if err := tmos.EnsureDir(filepath.Dir(pvStateFile), 0777); err != nil { + if err := tmos.EnsureDir(filepath.Dir(pvStateFile), 0o777); err != nil { return err }