diff --git a/client/keys/show.go b/client/keys/show.go index 89b2f1b39d..3b574544b5 100644 --- a/client/keys/show.go +++ b/client/keys/show.go @@ -6,6 +6,7 @@ import ( "github.com/tendermint/tendermint/crypto" "net/http" + "github.com/cosmos/cosmos-sdk/crypto/keys/keyerror" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/gorilla/mux" "github.com/pkg/errors" @@ -13,7 +14,6 @@ import ( "github.com/spf13/viper" "github.com/tendermint/tendermint/crypto/multisig" "github.com/tendermint/tendermint/libs/cli" - "github.com/cosmos/cosmos-sdk/crypto/keys/keyerror" ) const ( diff --git a/client/keys/update.go b/client/keys/update.go index 5f4c92e6f6..2489bce128 100644 --- a/client/keys/update.go +++ b/client/keys/update.go @@ -9,8 +9,8 @@ import ( keys "github.com/cosmos/cosmos-sdk/crypto/keys" "github.com/gorilla/mux" - "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/crypto/keys/keyerror" + "github.com/spf13/cobra" ) func updateKeyCommand() *cobra.Command { diff --git a/client/keys/utils.go b/client/keys/utils.go index 522015e1b4..8a7eefea38 100644 --- a/client/keys/utils.go +++ b/client/keys/utils.go @@ -77,7 +77,7 @@ func ReadPassphraseFromStdin(name string) (string, error) { // TODO make keybase take a database not load from the directory -// GetKeyBase initializes a read-only KeyBase based on the configuration. +// GetKeyBase initializes a read-only KeyBase based on the configuration. func GetKeyBase() (keys.Keybase, error) { rootDir := viper.GetString(cli.HomeFlag) return GetKeyBaseFromDir(rootDir) diff --git a/client/keys/utils_test.go b/client/keys/utils_test.go index 39ca634289..6b65bb55a5 100644 --- a/client/keys/utils_test.go +++ b/client/keys/utils_test.go @@ -16,7 +16,7 @@ func TestGetKeyBaseLocks(t *testing.T) { // Acquire db kb, err := GetKeyBaseFromDirWithWritePerm(dir) require.Nil(t, err) - _, _, err = kb.CreateMnemonic("foo", keys.English, "12345678", keys.Secp256k1) + _, _, err = kb.CreateMnemonic("foo", keys.English, "12345678", keys.Secp256k1) require.Nil(t, err) // Reset global variable keybase = nil diff --git a/crypto/keys/keybase.go b/crypto/keys/keybase.go index ad43bfd9f4..86ae5c1571 100644 --- a/crypto/keys/keybase.go +++ b/crypto/keys/keybase.go @@ -15,11 +15,11 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/mintkey" "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/keyerror" tmcrypto "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/encoding/amino" "github.com/tendermint/tendermint/crypto/secp256k1" dbm "github.com/tendermint/tendermint/libs/db" - "github.com/cosmos/cosmos-sdk/crypto/keys/keyerror" ) var _ Keybase = dbKeybase{} diff --git a/crypto/keys/mintkey/mintkey.go b/crypto/keys/mintkey/mintkey.go index 20a183f330..35cb9ccabf 100644 --- a/crypto/keys/mintkey/mintkey.go +++ b/crypto/keys/mintkey/mintkey.go @@ -11,8 +11,8 @@ import ( "github.com/tendermint/tendermint/crypto/encoding/amino" "github.com/tendermint/tendermint/crypto/xsalsa20symmetric" - cmn "github.com/tendermint/tendermint/libs/common" "github.com/cosmos/cosmos-sdk/crypto/keys/keyerror" + cmn "github.com/tendermint/tendermint/libs/common" ) const ( diff --git a/x/auth/client/rest/sign.go b/x/auth/client/rest/sign.go index 4a257ff6c6..13dd8d20c3 100644 --- a/x/auth/client/rest/sign.go +++ b/x/auth/client/rest/sign.go @@ -7,9 +7,9 @@ import ( "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/client/utils" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/keyerror" "github.com/cosmos/cosmos-sdk/x/auth" authtxb "github.com/cosmos/cosmos-sdk/x/auth/client/txbuilder" - "github.com/cosmos/cosmos-sdk/crypto/keys/keyerror" ) // SignBody defines the properties of a sign request's body. diff --git a/x/gov/client/cli/tx.go b/x/gov/client/cli/tx.go index eebcda882f..4b23002bd7 100644 --- a/x/gov/client/cli/tx.go +++ b/x/gov/client/cli/tx.go @@ -15,9 +15,9 @@ import ( "io/ioutil" "strings" + "github.com/cosmos/cosmos-sdk/x/gov/client" "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/cosmos/cosmos-sdk/x/gov/client" ) const ( diff --git a/x/gov/client/rest/rest.go b/x/gov/client/rest/rest.go index 882dcf0e1b..374f5cc2ac 100644 --- a/x/gov/client/rest/rest.go +++ b/x/gov/client/rest/rest.go @@ -10,9 +10,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov" + "github.com/cosmos/cosmos-sdk/x/gov/client" "github.com/gorilla/mux" "github.com/pkg/errors" - "github.com/cosmos/cosmos-sdk/x/gov/client" ) // REST Variable names @@ -41,12 +41,12 @@ func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router, cdc *codec.Codec) } type postProposalReq struct { - BaseReq utils.BaseReq `json:"base_req"` - Title string `json:"title"` // Title of the proposal - Description string `json:"description"` // Description of the proposal - ProposalType string `json:"proposal_type"` // Type of proposal. Initial set {PlainTextProposal, SoftwareUpgradeProposal} - Proposer sdk.AccAddress `json:"proposer"` // Address of the proposer - InitialDeposit sdk.Coins `json:"initial_deposit"` // Coins to add to the proposal's deposit + BaseReq utils.BaseReq `json:"base_req"` + Title string `json:"title"` // Title of the proposal + Description string `json:"description"` // Description of the proposal + ProposalType string `json:"proposal_type"` // Type of proposal. Initial set {PlainTextProposal, SoftwareUpgradeProposal} + Proposer sdk.AccAddress `json:"proposer"` // Address of the proposer + InitialDeposit sdk.Coins `json:"initial_deposit"` // Coins to add to the proposal's deposit } type depositReq struct { @@ -58,7 +58,7 @@ type depositReq struct { type voteReq struct { BaseReq utils.BaseReq `json:"base_req"` Voter sdk.AccAddress `json:"voter"` // address of the voter - Option string `json:"option"` // option from OptionSet chosen by the voter + Option string `json:"option"` // option from OptionSet chosen by the voter } func postProposalHandlerFn(cdc *codec.Codec, cliCtx context.CLIContext) http.HandlerFunc { diff --git a/x/gov/client/utils.go b/x/gov/client/utils.go index 8dcde5c62e..013f3944a3 100644 --- a/x/gov/client/utils.go +++ b/x/gov/client/utils.go @@ -42,4 +42,3 @@ func NormalizeProposalStatus(status string) string { } return "" } - diff --git a/x/slashing/client/rest/query.go b/x/slashing/client/rest/query.go index 8beab13adf..99db0df63b 100644 --- a/x/slashing/client/rest/query.go +++ b/x/slashing/client/rest/query.go @@ -4,11 +4,11 @@ import ( "net/http" "github.com/cosmos/cosmos-sdk/client/context" + "github.com/cosmos/cosmos-sdk/client/utils" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/slashing" "github.com/gorilla/mux" - "github.com/cosmos/cosmos-sdk/client/utils" ) func registerQueryRoutes(cliCtx context.CLIContext, r *mux.Router, cdc *codec.Codec) { diff --git a/x/slashing/client/rest/tx.go b/x/slashing/client/rest/tx.go index 3059fe4c35..5f33a1210c 100644 --- a/x/slashing/client/rest/tx.go +++ b/x/slashing/client/rest/tx.go @@ -23,7 +23,7 @@ func registerTxRoutes(cliCtx context.CLIContext, r *mux.Router, cdc *codec.Codec // Unjail TX body type UnjailReq struct { - BaseReq utils.BaseReq `json:"base_req"` + BaseReq utils.BaseReq `json:"base_req"` } func unjailRequestHandlerFn(cdc *codec.Codec, kb keys.Keybase, cliCtx context.CLIContext) http.HandlerFunc {