Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rigelrozanski committed Aug 8, 2018
1 parent 8abcdaa commit 7030081
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion client/tx/broadcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/cosmos/cosmos-sdk/client/context"
)

// BroadcastTxBody Tx Broadcast Body
// Tx Broadcast Body
type BroadcastTxBody struct {
TxBytes string `json:"tx"`
}
Expand Down
4 changes: 2 additions & 2 deletions client/tx/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const (
flagAny = "any"
)

// Default client command to search through tagged transactions
// default client command to search through tagged transactions
func SearchTxCmd(cdc *wire.Codec) *cobra.Command {
cmd := &cobra.Command{
Use: "txs",
Expand Down Expand Up @@ -89,7 +89,7 @@ func searchTxs(cliCtx context.CLIContext, cdc *wire.Codec, tags []string) ([]Inf
return info, nil
}

// Parse the indexed txs into an array of Info
// parse the indexed txs into an array of Info
func FormatTxResults(cdc *wire.Codec, res []*ctypes.ResultTx) ([]Info, error) {
var err error
out := make([]Info, len(res))
Expand Down
2 changes: 1 addition & 1 deletion x/stake/client/rest/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type msgCompleteUnbondingInput struct {
ValidatorAddr string `json:"validator_addr"` // in bech32
}

// EditDelegationsBody The request body for edit delegations
// the request body for edit delegations
type EditDelegationsBody struct {
LocalAccountName string `json:"name"`
Password string `json:"password"`
Expand Down
14 changes: 7 additions & 7 deletions x/stake/client/rest/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
rpcclient "github.com/tendermint/tendermint/rpc/client"
)

// contains Checks if the a given query contains one of the tx types
// contains checks if the a given query contains one of the tx types
func contains(stringSlice []string, txType string) bool {
for _, word := range stringSlice {
if word == txType {
Expand All @@ -29,7 +29,7 @@ func contains(stringSlice []string, txType string) bool {
func getDelegatorValidator(cliCtx context.CLIContext, cdc *wire.Codec, delegatorAddr sdk.AccAddress, validatorAccAddr sdk.AccAddress) (
validator types.BechValidator, httpStatusCode int, errMsg string, err error) {

// Check if the delegator is bonded or redelegated to the validator
// check if the delegator is bonded or redelegated to the validator
keyDel := stake.GetDelegationKey(delegatorAddr, validatorAccAddr)
// keyRed := stake.GetREDsByDelToValDstIndexKey(delegatorAddr, validatorAccAddr)

Expand Down Expand Up @@ -127,7 +127,7 @@ func getDelegatorRedelegations(cliCtx context.CLIContext, cdc *wire.Codec, deleg
return redelegations, http.StatusOK, "", nil
}

// queryTxs Queries staking txs
// queries staking txs
func queryTxs(node rpcclient.Client, cdc *wire.Codec, tag string, delegatorAddr string) ([]tx.Info, error) {
page := 0
perPage := 100
Expand All @@ -141,7 +141,7 @@ func queryTxs(node rpcclient.Client, cdc *wire.Codec, tag string, delegatorAddr
return tx.FormatTxResults(cdc, res.Txs)
}

// getValidators Gets all Validators
// gets all validators
func getValidators(validatorKVs []sdk.KVPair, cdc *wire.Codec) ([]types.BechValidator, error) {
validators := make([]types.BechValidator, len(validatorKVs))
for i, kv := range validatorKVs {
Expand All @@ -161,7 +161,7 @@ func getValidators(validatorKVs []sdk.KVPair, cdc *wire.Codec) ([]types.BechVali
return validators, nil
}

// Gets a validator given a ValAddress
// gets a validator given a ValAddress
func getValidator(address sdk.AccAddress, validatorKVs []sdk.KVPair, cdc *wire.Codec) (stake.BechValidator, error) {
// parse out the validators
for _, kv := range validatorKVs {
Expand All @@ -184,7 +184,7 @@ func getValidator(address sdk.AccAddress, validatorKVs []sdk.KVPair, cdc *wire.C
return stake.BechValidator{}, errors.Errorf("Couldn't find validator")
}

// Gets a validator given an AccAddress
// gets a validator given an AccAddress
func getValidatorFromAccAdrr(address sdk.AccAddress, validatorKVs []sdk.KVPair, cdc *wire.Codec) (stake.BechValidator, error) {
// parse out the validators
for _, kv := range validatorKVs {
Expand All @@ -207,7 +207,7 @@ func getValidatorFromAccAdrr(address sdk.AccAddress, validatorKVs []sdk.KVPair,
return stake.BechValidator{}, errors.Errorf("Couldn't find validator")
}

// Gets all Bech32 validators from a key
// gets all Bech32 validators from a key
func getBech32Validators(storeName string, cliCtx context.CLIContext, cdc *wire.Codec) (
validators []types.BechValidator, httpStatusCode int, errMsg string, err error) {
// Get all validators using key
Expand Down

0 comments on commit 7030081

Please sign in to comment.