linter: enable nolintlint (#6162)
* nolintlint enable * remove space * fix tests Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
4e328d75db
commit
bef3689245
|
@ -35,7 +35,7 @@ linters:
|
||||||
- unparam
|
- unparam
|
||||||
- misspell
|
- misspell
|
||||||
# - wsl
|
# - wsl
|
||||||
# - nolintlint
|
- nolintlint
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
exclude-rules:
|
exclude-rules:
|
||||||
|
|
|
@ -13,7 +13,6 @@ import (
|
||||||
"github.com/cosmos/cosmos-sdk/crypto/keyring"
|
"github.com/cosmos/cosmos-sdk/crypto/keyring"
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint
|
|
||||||
const (
|
const (
|
||||||
// DefaultGasAdjustment is applied to gas estimates to avoid tx execution
|
// DefaultGasAdjustment is applied to gas estimates to avoid tx execution
|
||||||
// failures due to state changes that might occur between the tx simulation
|
// failures due to state changes that might occur between the tx simulation
|
||||||
|
|
|
@ -63,7 +63,6 @@ func NewFactoryFromCLI(input io.Reader) Factory {
|
||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
|
|
||||||
// nolint
|
|
||||||
func (f Factory) AccountNumber() uint64 { return f.accountNumber }
|
func (f Factory) AccountNumber() uint64 { return f.accountNumber }
|
||||||
func (f Factory) Sequence() uint64 { return f.sequence }
|
func (f Factory) Sequence() uint64 { return f.sequence }
|
||||||
func (f Factory) Gas() uint64 { return f.gas }
|
func (f Factory) Gas() uint64 { return f.gas }
|
||||||
|
|
|
@ -424,7 +424,7 @@ func (ks keystore) List() ([]Info, error) {
|
||||||
var res []Info
|
var res []Info
|
||||||
|
|
||||||
keys, err := ks.db.Keys()
|
keys, err := ks.db.Keys()
|
||||||
if err != nil { //nolint:unparam
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -527,7 +527,7 @@ func SignWithLedger(info Info, msg []byte) (sig []byte, pub tmcrypto.PubKey, err
|
||||||
return nil, nil, errors.New("not a ledger object")
|
return nil, nil, errors.New("not a ledger object")
|
||||||
}
|
}
|
||||||
|
|
||||||
path, err := info.GetPath() //nolint:unparam
|
path, err := info.GetPath()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -629,7 +629,7 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) {
|
||||||
|
|
||||||
buf := bufio.NewReader(buf)
|
buf := bufio.NewReader(buf)
|
||||||
pass, err := input.GetPassword("Enter keyring passphrase:", buf)
|
pass, err := input.GetPassword("Enter keyring passphrase:", buf)
|
||||||
if err != nil { //nolint:unparam
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, err)
|
fmt.Fprintln(os.Stderr, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -656,7 +656,7 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) {
|
||||||
|
|
||||||
saltBytes := tmcrypto.CRandBytes(16)
|
saltBytes := tmcrypto.CRandBytes(16)
|
||||||
passwordHash, err := bcrypt.GenerateFromPassword(saltBytes, []byte(pass), 2)
|
passwordHash, err := bcrypt.GenerateFromPassword(saltBytes, []byte(pass), 2)
|
||||||
if err != nil { //nolint:unparam
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, err)
|
fmt.Fprintln(os.Stderr, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,6 @@ func (msg MsgSubmitProposal) ValidateBasic() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// nolint
|
|
||||||
func (msg *MsgSubmitProposal) GetContent() gov.Content { return msg.Content.GetContent() }
|
func (msg *MsgSubmitProposal) GetContent() gov.Content { return msg.Content.GetContent() }
|
||||||
func (msg *MsgSubmitProposal) SetContent(content gov.Content) error {
|
func (msg *MsgSubmitProposal) SetContent(content gov.Content) error {
|
||||||
stdContent := &Content{}
|
stdContent := &Content{}
|
||||||
|
|
|
@ -48,6 +48,5 @@ func (s Store) CacheWrapWithTrace(w io.Writer, tc types.TraceContext) types.Cach
|
||||||
// Commit performs a no-op as entries are persistent between commitments.
|
// Commit performs a no-op as entries are persistent between commitments.
|
||||||
func (s *Store) Commit() (id types.CommitID) { return }
|
func (s *Store) Commit() (id types.CommitID) { return }
|
||||||
|
|
||||||
// nolint
|
|
||||||
func (s *Store) SetPruning(pruning types.PruningOptions) {}
|
func (s *Store) SetPruning(pruning types.PruningOptions) {}
|
||||||
func (s Store) LastCommitID() (id types.CommitID) { return }
|
func (s Store) LastCommitID() (id types.CommitID) { return }
|
||||||
|
|
|
@ -5,7 +5,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// Import cosmos-sdk/types/store.go for convenience.
|
// Import cosmos-sdk/types/store.go for convenience.
|
||||||
// nolint
|
|
||||||
type (
|
type (
|
||||||
PruningOptions = types.PruningOptions
|
PruningOptions = types.PruningOptions
|
||||||
Store = types.Store
|
Store = types.Store
|
||||||
|
@ -22,8 +21,8 @@ type (
|
||||||
CacheWrapper = types.CacheWrapper
|
CacheWrapper = types.CacheWrapper
|
||||||
CacheWrap = types.CacheWrap
|
CacheWrap = types.CacheWrap
|
||||||
CommitID = types.CommitID
|
CommitID = types.CommitID
|
||||||
StoreKey = types.StoreKey
|
Key = types.StoreKey
|
||||||
StoreType = types.StoreType
|
Type = types.StoreType
|
||||||
Queryable = types.Queryable
|
Queryable = types.Queryable
|
||||||
TraceContext = types.TraceContext
|
TraceContext = types.TraceContext
|
||||||
Gas = types.Gas
|
Gas = types.Gas
|
||||||
|
@ -31,7 +30,6 @@ type (
|
||||||
GasConfig = types.GasConfig
|
GasConfig = types.GasConfig
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint - reexport
|
|
||||||
var (
|
var (
|
||||||
PruneNothing = types.PruneNothing
|
PruneNothing = types.PruneNothing
|
||||||
PruneEverything = types.PruneEverything
|
PruneEverything = types.PruneEverything
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
dbm "github.com/tendermint/tm-db"
|
dbm "github.com/tendermint/tm-db"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Store interface { //nolint
|
type Store interface {
|
||||||
GetStoreType() StoreType
|
GetStoreType() StoreType
|
||||||
CacheWrapper
|
CacheWrapper
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ func (s *StoreUpgrades) RenamedFrom(key string) string {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type MultiStore interface { //nolint
|
type MultiStore interface {
|
||||||
Store
|
Store
|
||||||
|
|
||||||
// Cache wrap MultiStore.
|
// Cache wrap MultiStore.
|
||||||
|
@ -236,7 +236,7 @@ type CacheWrap interface {
|
||||||
CacheWrapWithTrace(w io.Writer, tc TraceContext) CacheWrap
|
CacheWrapWithTrace(w io.Writer, tc TraceContext) CacheWrap
|
||||||
}
|
}
|
||||||
|
|
||||||
type CacheWrapper interface { //nolint
|
type CacheWrapper interface {
|
||||||
// CacheWrap cache wraps.
|
// CacheWrap cache wraps.
|
||||||
CacheWrap() CacheWrap
|
CacheWrap() CacheWrap
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ type CommitID struct {
|
||||||
Hash []byte
|
Hash []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cid CommitID) IsZero() bool { //nolint
|
func (cid CommitID) IsZero() bool {
|
||||||
return cid.Version == 0 && len(cid.Hash) == 0
|
return cid.Version == 0 && len(cid.Hash) == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,7 +268,6 @@ func (cid CommitID) String() string {
|
||||||
type StoreType int
|
type StoreType int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
//nolint
|
|
||||||
StoreTypeMulti StoreType = iota
|
StoreTypeMulti StoreType = iota
|
||||||
StoreTypeDB
|
StoreTypeDB
|
||||||
StoreTypeIAVL
|
StoreTypeIAVL
|
||||||
|
|
|
@ -563,7 +563,6 @@ func removeZeroCoins(coins Coins) Coins {
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Sort interface
|
// Sort interface
|
||||||
|
|
||||||
//nolint
|
|
||||||
func (coins Coins) Len() int { return len(coins) }
|
func (coins Coins) Len() int { return len(coins) }
|
||||||
func (coins Coins) Less(i, j int) bool { return coins[i].Denom < coins[j].Denom }
|
func (coins Coins) Less(i, j int) bool { return coins[i].Denom < coins[j].Denom }
|
||||||
func (coins Coins) Swap(i, j int) { coins[i], coins[j] = coins[j], coins[i] }
|
func (coins Coins) Swap(i, j int) { coins[i], coins[j] = coins[j], coins[i] }
|
||||||
|
|
|
@ -575,7 +575,6 @@ func removeZeroDecCoins(coins DecCoins) DecCoins {
|
||||||
|
|
||||||
var _ sort.Interface = Coins{}
|
var _ sort.Interface = Coins{}
|
||||||
|
|
||||||
//nolint
|
|
||||||
func (coins DecCoins) Len() int { return len(coins) }
|
func (coins DecCoins) Len() int { return len(coins) }
|
||||||
func (coins DecCoins) Less(i, j int) bool { return coins[i].Denom < coins[j].Denom }
|
func (coins DecCoins) Less(i, j int) bool { return coins[i].Denom < coins[j].Denom }
|
||||||
func (coins DecCoins) Swap(i, j int) { coins[i], coins[j] = coins[j], coins[i] }
|
func (coins DecCoins) Swap(i, j int) { coins[i], coins[j] = coins[j], coins[i] }
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
package types
|
package types
|
||||||
|
|
||||||
import (
|
|
||||||
_ "github.com/gogo/protobuf/gogoproto" // nolint
|
|
||||||
_ "github.com/regen-network/cosmos-proto" // nolint
|
|
||||||
)
|
|
||||||
|
|
||||||
// CustomProtobufType defines the interface custom gogo proto types must implement
|
// CustomProtobufType defines the interface custom gogo proto types must implement
|
||||||
// in order to be used as a "customtype" extension.
|
// in order to be used as a "customtype" extension.
|
||||||
//
|
//
|
||||||
|
|
|
@ -6,12 +6,10 @@ import (
|
||||||
"github.com/cosmos/cosmos-sdk/store/types"
|
"github.com/cosmos/cosmos-sdk/store/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint - reexport
|
|
||||||
type (
|
type (
|
||||||
PruningOptions = types.PruningOptions
|
PruningOptions = types.PruningOptions
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint - reexport
|
|
||||||
type (
|
type (
|
||||||
Store = types.Store
|
Store = types.Store
|
||||||
Committer = types.Committer
|
Committer = types.Committer
|
||||||
|
@ -57,7 +55,6 @@ func DiffKVStores(a KVStore, b KVStore, prefixesToSkip [][]byte) (kvAs, kvBs []t
|
||||||
return types.DiffKVStores(a, b, prefixesToSkip)
|
return types.DiffKVStores(a, b, prefixesToSkip)
|
||||||
}
|
}
|
||||||
|
|
||||||
// nolint - reexport
|
|
||||||
type (
|
type (
|
||||||
CacheKVStore = types.CacheKVStore
|
CacheKVStore = types.CacheKVStore
|
||||||
CommitKVStore = types.CommitKVStore
|
CommitKVStore = types.CommitKVStore
|
||||||
|
@ -66,10 +63,8 @@ type (
|
||||||
CommitID = types.CommitID
|
CommitID = types.CommitID
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint - reexport
|
|
||||||
type StoreType = types.StoreType
|
type StoreType = types.StoreType
|
||||||
|
|
||||||
// nolint - reexport
|
|
||||||
const (
|
const (
|
||||||
StoreTypeMulti = types.StoreTypeMulti
|
StoreTypeMulti = types.StoreTypeMulti
|
||||||
StoreTypeDB = types.StoreTypeDB
|
StoreTypeDB = types.StoreTypeDB
|
||||||
|
@ -78,7 +73,6 @@ const (
|
||||||
StoreTypeMemory = types.StoreTypeMemory
|
StoreTypeMemory = types.StoreTypeMemory
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint - reexport
|
|
||||||
type (
|
type (
|
||||||
StoreKey = types.StoreKey
|
StoreKey = types.StoreKey
|
||||||
CapabilityKey = types.CapabilityKey
|
CapabilityKey = types.CapabilityKey
|
||||||
|
@ -158,25 +152,21 @@ type TraceContext = types.TraceContext
|
||||||
|
|
||||||
// --------------------------------------
|
// --------------------------------------
|
||||||
|
|
||||||
// nolint - reexport
|
|
||||||
type (
|
type (
|
||||||
Gas = types.Gas
|
Gas = types.Gas
|
||||||
GasMeter = types.GasMeter
|
GasMeter = types.GasMeter
|
||||||
GasConfig = types.GasConfig
|
GasConfig = types.GasConfig
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint - reexport
|
|
||||||
func NewGasMeter(limit Gas) GasMeter {
|
func NewGasMeter(limit Gas) GasMeter {
|
||||||
return types.NewGasMeter(limit)
|
return types.NewGasMeter(limit)
|
||||||
}
|
}
|
||||||
|
|
||||||
// nolint - reexport
|
|
||||||
type (
|
type (
|
||||||
ErrorOutOfGas = types.ErrorOutOfGas
|
ErrorOutOfGas = types.ErrorOutOfGas
|
||||||
ErrorGasOverflow = types.ErrorGasOverflow
|
ErrorGasOverflow = types.ErrorGasOverflow
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint - reexport
|
|
||||||
func NewInfiniteGasMeter() GasMeter {
|
func NewInfiniteGasMeter() GasMeter {
|
||||||
return types.NewInfiniteGasMeter()
|
return types.NewInfiniteGasMeter()
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,6 @@ func NewTestMsg(addrs ...AccAddress) *TestMsg {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//nolint
|
|
||||||
func (msg *TestMsg) Route() string { return "TestMsg" }
|
func (msg *TestMsg) Route() string { return "TestMsg" }
|
||||||
func (msg *TestMsg) Type() string { return "Test message" }
|
func (msg *TestMsg) Type() string { return "Test message" }
|
||||||
func (msg *TestMsg) GetSignBytes() []byte {
|
func (msg *TestMsg) GetSignBytes() []byte {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
// nolint noalias
|
|
||||||
package types
|
package types
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
// nolint noalias
|
|
||||||
package types
|
package types
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package bank
|
package bank
|
||||||
|
|
||||||
// nolint
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/bank/keeper"
|
"github.com/cosmos/cosmos-sdk/x/bank/keeper"
|
||||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||||
|
|
|
@ -107,7 +107,7 @@ func supplyOfHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
denom := mux.Vars(r)["denom"]
|
denom := mux.Vars(r)["denom"]
|
||||||
cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r)
|
cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r)
|
||||||
if !ok { //nolint:unparam
|
if !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,14 +7,12 @@ import (
|
||||||
|
|
||||||
// DONTCOVER
|
// DONTCOVER
|
||||||
|
|
||||||
// nolint
|
|
||||||
const (
|
const (
|
||||||
ModuleName = types.ModuleName
|
ModuleName = types.ModuleName
|
||||||
StoreKey = types.StoreKey
|
StoreKey = types.StoreKey
|
||||||
MemStoreKey = types.MemStoreKey
|
MemStoreKey = types.MemStoreKey
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint
|
|
||||||
var (
|
var (
|
||||||
NewKeeper = keeper.NewKeeper
|
NewKeeper = keeper.NewKeeper
|
||||||
NewCapability = types.NewCapability
|
NewCapability = types.NewCapability
|
||||||
|
@ -30,12 +28,11 @@ var (
|
||||||
NewCapabilityOwners = types.NewCapabilityOwners
|
NewCapabilityOwners = types.NewCapabilityOwners
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint
|
|
||||||
type (
|
type (
|
||||||
Keeper = keeper.Keeper
|
Keeper = keeper.Keeper
|
||||||
ScopedKeeper = keeper.ScopedKeeper
|
ScopedKeeper = keeper.ScopedKeeper
|
||||||
Capability = types.Capability
|
Capability = types.Capability
|
||||||
CapabilityOwners = types.CapabilityOwners
|
Owners = types.CapabilityOwners
|
||||||
GenesisState = types.GenesisState
|
GenesisState = types.GenesisState
|
||||||
GenesisOwners = types.GenesisOwners
|
GenesisOwners = types.GenesisOwners
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package crisis
|
package crisis
|
||||||
|
|
||||||
// nolint
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/crisis/keeper"
|
"github.com/cosmos/cosmos-sdk/x/crisis/keeper"
|
||||||
"github.com/cosmos/cosmos-sdk/x/crisis/types"
|
"github.com/cosmos/cosmos-sdk/x/crisis/types"
|
||||||
|
|
|
@ -18,7 +18,6 @@ func NewMsgVerifyInvariant(sender sdk.AccAddress, invariantModuleName,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//nolint
|
|
||||||
func (msg MsgVerifyInvariant) Route() string { return ModuleName }
|
func (msg MsgVerifyInvariant) Route() string { return ModuleName }
|
||||||
func (msg MsgVerifyInvariant) Type() string { return "verify_invariant" }
|
func (msg MsgVerifyInvariant) Type() string { return "verify_invariant" }
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@ import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/distribution/types"
|
"github.com/cosmos/cosmos-sdk/x/distribution/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ModuleName = types.ModuleName
|
ModuleName = types.ModuleName
|
||||||
StoreKey = types.StoreKey
|
StoreKey = types.StoreKey
|
||||||
|
|
|
@ -5,8 +5,6 @@ import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/evidence/types"
|
"github.com/cosmos/cosmos-sdk/x/evidence/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ModuleName = types.ModuleName
|
ModuleName = types.ModuleName
|
||||||
StoreKey = types.StoreKey
|
StoreKey = types.StoreKey
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// nolint
|
package genutil
|
||||||
|
|
||||||
// autogenerated code using github.com/rigelrozanski/multitool
|
// autogenerated code using github.com/rigelrozanski/multitool
|
||||||
// aliases generated for the following subdirectories:
|
// aliases generated for the following subdirectories:
|
||||||
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/genutil/types
|
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/genutil/types
|
||||||
package genutil
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/genutil/types"
|
"github.com/cosmos/cosmos-sdk/x/genutil/types"
|
||||||
|
|
|
@ -207,7 +207,7 @@ func readUnsignedGenTxFile(cdc *codec.Codec, r io.Reader) (auth.StdTx, error) {
|
||||||
var stdTx auth.StdTx
|
var stdTx auth.StdTx
|
||||||
|
|
||||||
bytes, err := ioutil.ReadAll(r)
|
bytes, err := ioutil.ReadAll(r)
|
||||||
if err != nil { // nolint:unparam
|
if err != nil {
|
||||||
return stdTx, err
|
return stdTx, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ func writeSignedGenTx(cdc *codec.Codec, outputDocument string, tx auth.StdTx) er
|
||||||
defer outputFile.Close()
|
defer outputFile.Close()
|
||||||
|
|
||||||
json, err := cdc.MarshalJSON(tx)
|
json, err := cdc.MarshalJSON(tx)
|
||||||
if err != nil { //nolint:unparam
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ func displayInfo(cdc codec.JSONMarshaler, info printInfo) error {
|
||||||
|
|
||||||
// InitCmd returns a command that initializes all files needed for Tendermint
|
// InitCmd returns a command that initializes all files needed for Tendermint
|
||||||
// and the respective application.
|
// and the respective application.
|
||||||
func InitCmd(ctx *server.Context, cdc codec.JSONMarshaler, mbm module.BasicManager, defaultNodeHome string) *cobra.Command { // nolint: golint
|
func InitCmd(ctx *server.Context, cdc codec.JSONMarshaler, mbm module.BasicManager, defaultNodeHome string) *cobra.Command {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "init [moniker]",
|
Use: "init [moniker]",
|
||||||
Short: "Initialize private validator, p2p, genesis, and application configuration files",
|
Short: "Initialize private validator, p2p, genesis, and application configuration files",
|
||||||
|
|
|
@ -74,7 +74,7 @@ func CollectStdTxs(cdc *codec.Codec, moniker, genTxsDir string,
|
||||||
|
|
||||||
var fos []os.FileInfo
|
var fos []os.FileInfo
|
||||||
fos, err = ioutil.ReadDir(genTxsDir)
|
fos, err = ioutil.ReadDir(genTxsDir)
|
||||||
if err != nil { //nolint:unparam
|
if err != nil {
|
||||||
return appGenTxs, persistentPeers, err
|
return appGenTxs, persistentPeers, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package gov
|
package gov
|
||||||
|
|
||||||
// nolint
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/gov/keeper"
|
"github.com/cosmos/cosmos-sdk/x/gov/keeper"
|
||||||
"github.com/cosmos/cosmos-sdk/x/gov/types"
|
"github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
func (keeper Keeper) GetDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress) (deposit types.Deposit, found bool) {
|
func (keeper Keeper) GetDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress) (deposit types.Deposit, found bool) {
|
||||||
store := ctx.KVStore(keeper.storeKey)
|
store := ctx.KVStore(keeper.storeKey)
|
||||||
bz := store.Get(types.DepositKey(proposalID, depositorAddr))
|
bz := store.Get(types.DepositKey(proposalID, depositorAddr))
|
||||||
if bz == nil { //nolint:unparam
|
if bz == nil {
|
||||||
return deposit, false
|
return deposit, false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,6 @@ func (msg MsgSubmitProposal) GetSignBytes() []byte {
|
||||||
return sdk.MustSortJSON(bz)
|
return sdk.MustSortJSON(bz)
|
||||||
}
|
}
|
||||||
|
|
||||||
// nolint
|
|
||||||
func (msg MsgSubmitProposal) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{msg.Proposer} }
|
func (msg MsgSubmitProposal) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{msg.Proposer} }
|
||||||
func (msg MsgSubmitProposal) Route() string { return RouterKey }
|
func (msg MsgSubmitProposal) Route() string { return RouterKey }
|
||||||
func (msg MsgSubmitProposal) Type() string { return TypeMsgSubmitProposal }
|
func (msg MsgSubmitProposal) Type() string { return TypeMsgSubmitProposal }
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package client
|
package client
|
||||||
|
|
||||||
// nolint
|
|
||||||
// autogenerated code using github.com/rigelrozanski/multitool
|
// autogenerated code using github.com/rigelrozanski/multitool
|
||||||
// aliases generated for the following subdirectories:
|
// aliases generated for the following subdirectories:
|
||||||
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/02-client/keeper
|
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/02-client/keeper
|
||||||
|
@ -48,10 +47,9 @@ var (
|
||||||
AttributeValueCategory = types.AttributeValueCategory
|
AttributeValueCategory = types.AttributeValueCategory
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint
|
|
||||||
type (
|
type (
|
||||||
Keeper = keeper.Keeper
|
Keeper = keeper.Keeper
|
||||||
StakingKeeper = types.StakingKeeper
|
StakingKeeper = types.StakingKeeper
|
||||||
GenesisState = types.GenesisState
|
GenesisState = types.GenesisState
|
||||||
ClientConsensusStates = types.ClientConsensusStates
|
ConsensusStates = types.ClientConsensusStates
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package connection
|
package connection
|
||||||
|
|
||||||
// nolint
|
|
||||||
// autogenerated code using github.com/rigelrozanski/multitool
|
// autogenerated code using github.com/rigelrozanski/multitool
|
||||||
// aliases generated for the following subdirectories:
|
// aliases generated for the following subdirectories:
|
||||||
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/03-connection/keeper
|
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/03-connection/keeper
|
||||||
|
@ -62,19 +61,18 @@ var (
|
||||||
AttributeValueCategory = types.AttributeValueCategory
|
AttributeValueCategory = types.AttributeValueCategory
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint: golint
|
|
||||||
type (
|
type (
|
||||||
Keeper = keeper.Keeper
|
Keeper = keeper.Keeper
|
||||||
ConnectionEnd = types.ConnectionEnd
|
End = types.ConnectionEnd
|
||||||
Counterparty = types.Counterparty
|
Counterparty = types.Counterparty
|
||||||
ClientKeeper = types.ClientKeeper
|
ClientKeeper = types.ClientKeeper
|
||||||
MsgConnectionOpenInit = types.MsgConnectionOpenInit
|
MsgConnectionOpenInit = types.MsgConnectionOpenInit
|
||||||
MsgConnectionOpenTry = types.MsgConnectionOpenTry
|
MsgConnectionOpenTry = types.MsgConnectionOpenTry
|
||||||
MsgConnectionOpenAck = types.MsgConnectionOpenAck
|
MsgConnectionOpenAck = types.MsgConnectionOpenAck
|
||||||
MsgConnectionOpenConfirm = types.MsgConnectionOpenConfirm
|
MsgConnectionOpenConfirm = types.MsgConnectionOpenConfirm
|
||||||
ConnectionResponse = types.ConnectionResponse
|
Response = types.ConnectionResponse
|
||||||
ClientConnectionsResponse = types.ClientConnectionsResponse
|
ClientConnectionsResponse = types.ClientConnectionsResponse
|
||||||
QueryClientConnectionsParams = types.QueryClientConnectionsParams
|
QueryClientConnectionsParams = types.QueryClientConnectionsParams
|
||||||
GenesisState = types.GenesisState
|
GenesisState = types.GenesisState
|
||||||
ConnectionPaths = types.ConnectionPaths
|
Paths = types.ConnectionPaths
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package channel
|
package channel
|
||||||
|
|
||||||
// nolint
|
|
||||||
// autogenerated code using github.com/rigelrozanski/multitool
|
// autogenerated code using github.com/rigelrozanski/multitool
|
||||||
// aliases generated for the following subdirectories:
|
// aliases generated for the following subdirectories:
|
||||||
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/04-channel/keeper
|
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/04-channel/keeper
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package port
|
package port
|
||||||
|
|
||||||
// nolint
|
|
||||||
// autogenerated code using github.com/rigelrozanski/multitool
|
// autogenerated code using github.com/rigelrozanski/multitool
|
||||||
// aliases generated for the following subdirectories:
|
// aliases generated for the following subdirectories:
|
||||||
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/05-port/keeper
|
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/05-port/keeper
|
||||||
|
|
|
@ -146,7 +146,7 @@ func (suite *TendermintTestSuite) TestVerifyConnectionState() {
|
||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
name string
|
name string
|
||||||
clientState ibctmtypes.ClientState
|
clientState ibctmtypes.ClientState
|
||||||
connection connection.ConnectionEnd
|
connection connection.End
|
||||||
consensusState ibctmtypes.ConsensusState
|
consensusState ibctmtypes.ConsensusState
|
||||||
prefix commitmenttypes.MerklePrefix
|
prefix commitmenttypes.MerklePrefix
|
||||||
proof commitmenttypes.MerkleProof
|
proof commitmenttypes.MerkleProof
|
||||||
|
|
|
@ -100,7 +100,7 @@ func (suite *LocalhostTestSuite) TestVerifyConnectionState() {
|
||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
name string
|
name string
|
||||||
clientState types.ClientState
|
clientState types.ClientState
|
||||||
connection connection.ConnectionEnd
|
connection connection.End
|
||||||
prefix commitmenttypes.MerklePrefix
|
prefix commitmenttypes.MerklePrefix
|
||||||
proof commitmenttypes.MerkleProof
|
proof commitmenttypes.MerkleProof
|
||||||
expPass bool
|
expPass bool
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package transfer
|
package transfer
|
||||||
|
|
||||||
// nolint
|
|
||||||
// autogenerated code using github.com/rigelrozanski/multitool
|
// autogenerated code using github.com/rigelrozanski/multitool
|
||||||
// aliases generated for the following subdirectories:
|
// aliases generated for the following subdirectories:
|
||||||
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/20-transfer/keeper
|
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/20-transfer/keeper
|
||||||
|
|
|
@ -41,7 +41,7 @@ type ClientKeeper interface {
|
||||||
|
|
||||||
// ConnectionKeeper defines the expected IBC connection keeper
|
// ConnectionKeeper defines the expected IBC connection keeper
|
||||||
type ConnectionKeeper interface {
|
type ConnectionKeeper interface {
|
||||||
GetConnection(ctx sdk.Context, connectionID string) (connection connection.ConnectionEnd, found bool)
|
GetConnection(ctx sdk.Context, connectionID string) (connection connection.End, found bool)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PortKeeper defines the expected IBC port keeper
|
// PortKeeper defines the expected IBC port keeper
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package ibc
|
package ibc
|
||||||
|
|
||||||
// nolint
|
|
||||||
// autogenerated code using github.com/rigelrozanski/multitool
|
// autogenerated code using github.com/rigelrozanski/multitool
|
||||||
// aliases generated for the following subdirectories:
|
// aliases generated for the following subdirectories:
|
||||||
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/keeper
|
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/keeper
|
||||||
|
|
|
@ -31,7 +31,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() {
|
||||||
ibctmtypes.NewClientState(clientID, trustingPeriod, ubdPeriod, maxClockDrift, suite.header),
|
ibctmtypes.NewClientState(clientID, trustingPeriod, ubdPeriod, maxClockDrift, suite.header),
|
||||||
localhosttypes.NewClientState(suite.store, "chaindID", 10),
|
localhosttypes.NewClientState(suite.store, "chaindID", 10),
|
||||||
},
|
},
|
||||||
[]client.ClientConsensusStates{
|
[]client.ConsensusStates{
|
||||||
client.NewClientConsensusStates(
|
client.NewClientConsensusStates(
|
||||||
clientID,
|
clientID,
|
||||||
[]exported.ConsensusState{
|
[]exported.ConsensusState{
|
||||||
|
@ -43,10 +43,10 @@ func (suite *IBCTestSuite) TestValidateGenesis() {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ConnectionGenesis: connection.NewGenesisState(
|
ConnectionGenesis: connection.NewGenesisState(
|
||||||
[]connection.ConnectionEnd{
|
[]connection.End{
|
||||||
connection.NewConnectionEnd(ibctypes.INIT, connectionID, clientID, connection.NewCounterparty(clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []string{"1.0.0"}),
|
connection.NewConnectionEnd(ibctypes.INIT, connectionID, clientID, connection.NewCounterparty(clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []string{"1.0.0"}),
|
||||||
},
|
},
|
||||||
[]connection.ConnectionPaths{
|
[]connection.Paths{
|
||||||
connection.NewConnectionPaths(clientID, []string{ibctypes.ConnectionPath(connectionID)}),
|
connection.NewConnectionPaths(clientID, []string{ibctypes.ConnectionPath(connectionID)}),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -94,10 +94,10 @@ func (suite *IBCTestSuite) TestValidateGenesis() {
|
||||||
genState: ibc.GenesisState{
|
genState: ibc.GenesisState{
|
||||||
ClientGenesis: client.DefaultGenesisState(),
|
ClientGenesis: client.DefaultGenesisState(),
|
||||||
ConnectionGenesis: connection.NewGenesisState(
|
ConnectionGenesis: connection.NewGenesisState(
|
||||||
[]connection.ConnectionEnd{
|
[]connection.End{
|
||||||
connection.NewConnectionEnd(ibctypes.INIT, connectionID, "CLIENTIDONE", connection.NewCounterparty(clientID, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []string{"1.0.0"}),
|
connection.NewConnectionEnd(ibctypes.INIT, connectionID, "CLIENTIDONE", connection.NewCounterparty(clientID, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []string{"1.0.0"}),
|
||||||
},
|
},
|
||||||
[]connection.ConnectionPaths{
|
[]connection.Paths{
|
||||||
connection.NewConnectionPaths(clientID, []string{ibctypes.ConnectionPath(connectionID)}),
|
connection.NewConnectionPaths(clientID, []string{ibctypes.ConnectionPath(connectionID)}),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package mint
|
package mint
|
||||||
|
|
||||||
// nolint
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/mint/keeper"
|
"github.com/cosmos/cosmos-sdk/x/mint/keeper"
|
||||||
"github.com/cosmos/cosmos-sdk/x/mint/types"
|
"github.com/cosmos/cosmos-sdk/x/mint/types"
|
||||||
|
|
|
@ -58,7 +58,7 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger {
|
||||||
func (k Keeper) GetMinter(ctx sdk.Context) (minter types.Minter) {
|
func (k Keeper) GetMinter(ctx sdk.Context) (minter types.Minter) {
|
||||||
store := ctx.KVStore(k.storeKey)
|
store := ctx.KVStore(k.storeKey)
|
||||||
b := store.Get(types.MinterKey)
|
b := store.Get(types.MinterKey)
|
||||||
if b == nil { //nolint:unparam
|
if b == nil {
|
||||||
panic("stored minter should not have been nil")
|
panic("stored minter should not have been nil")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ package types
|
||||||
// MinterKey is the key to use for the keeper store.
|
// MinterKey is the key to use for the keeper store.
|
||||||
var MinterKey = []byte{0x00}
|
var MinterKey = []byte{0x00}
|
||||||
|
|
||||||
// nolint
|
|
||||||
const (
|
const (
|
||||||
// module name
|
// module name
|
||||||
ModuleName = "mint"
|
ModuleName = "mint"
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package params
|
package params
|
||||||
|
|
||||||
// nolint
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/params/keeper"
|
"github.com/cosmos/cosmos-sdk/x/params/keeper"
|
||||||
"github.com/cosmos/cosmos-sdk/x/params/types"
|
"github.com/cosmos/cosmos-sdk/x/params/types"
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package slashing
|
package slashing
|
||||||
|
|
||||||
// nolint
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/slashing/keeper"
|
"github.com/cosmos/cosmos-sdk/x/slashing/keeper"
|
||||||
"github.com/cosmos/cosmos-sdk/x/slashing/types"
|
"github.com/cosmos/cosmos-sdk/x/slashing/types"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package cli
|
package cli
|
||||||
|
|
||||||
// nolint
|
|
||||||
const (
|
const (
|
||||||
FlagAddressValidator = "validator"
|
FlagAddressValidator = "validator"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
// nolint
|
|
||||||
package keeper
|
package keeper
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -14,7 +14,6 @@ func NewMsgUnjail(validatorAddr sdk.ValAddress) MsgUnjail {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//nolint
|
|
||||||
func (msg MsgUnjail) Route() string { return RouterKey }
|
func (msg MsgUnjail) Route() string { return RouterKey }
|
||||||
func (msg MsgUnjail) Type() string { return "unjail" }
|
func (msg MsgUnjail) Type() string { return "unjail" }
|
||||||
func (msg MsgUnjail) GetSigners() []sdk.AccAddress {
|
func (msg MsgUnjail) GetSigners() []sdk.AccAddress {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package upgrade
|
package upgrade
|
||||||
|
|
||||||
// nolint
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
|
"github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
|
||||||
"github.com/cosmos/cosmos-sdk/x/upgrade/types"
|
"github.com/cosmos/cosmos-sdk/x/upgrade/types"
|
||||||
|
|
|
@ -25,7 +25,6 @@ func init() {
|
||||||
gov.RegisterProposalTypeCodec(&CancelSoftwareUpgradeProposal{}, "cosmos-sdk/CancelSoftwareUpgradeProposal")
|
gov.RegisterProposalTypeCodec(&CancelSoftwareUpgradeProposal{}, "cosmos-sdk/CancelSoftwareUpgradeProposal")
|
||||||
}
|
}
|
||||||
|
|
||||||
// nolint
|
|
||||||
func (sup *SoftwareUpgradeProposal) GetTitle() string { return sup.Title }
|
func (sup *SoftwareUpgradeProposal) GetTitle() string { return sup.Title }
|
||||||
func (sup *SoftwareUpgradeProposal) GetDescription() string { return sup.Description }
|
func (sup *SoftwareUpgradeProposal) GetDescription() string { return sup.Description }
|
||||||
func (sup *SoftwareUpgradeProposal) ProposalRoute() string { return RouterKey }
|
func (sup *SoftwareUpgradeProposal) ProposalRoute() string { return RouterKey }
|
||||||
|
@ -51,7 +50,6 @@ func NewCancelSoftwareUpgradeProposal(title, description string) gov.Content {
|
||||||
// Implements Proposal Interface
|
// Implements Proposal Interface
|
||||||
var _ gov.Content = &CancelSoftwareUpgradeProposal{}
|
var _ gov.Content = &CancelSoftwareUpgradeProposal{}
|
||||||
|
|
||||||
// nolint
|
|
||||||
func (sup *CancelSoftwareUpgradeProposal) GetTitle() string { return sup.Title }
|
func (sup *CancelSoftwareUpgradeProposal) GetTitle() string { return sup.Title }
|
||||||
func (sup *CancelSoftwareUpgradeProposal) GetDescription() string { return sup.Description }
|
func (sup *CancelSoftwareUpgradeProposal) GetDescription() string { return sup.Description }
|
||||||
func (sup *CancelSoftwareUpgradeProposal) ProposalRoute() string { return RouterKey }
|
func (sup *CancelSoftwareUpgradeProposal) ProposalRoute() string { return RouterKey }
|
||||||
|
|
Loading…
Reference in New Issue