WithTrustNode, Makefile fixes, 'make format'

This commit is contained in:
Christopher Goes
2018-10-04 08:34:39 +02:00
parent 1d4cfe89d2
commit c676eab46b
10 changed files with 31 additions and 33 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ type CLIContext struct {
GenerateOnly bool
fromAddress types.AccAddress
fromName string
Indent bool
Indent bool
}
// NewCLIContext returns a new initialized CLIContext with parameters from the
+19 -19
View File
@@ -17,25 +17,25 @@ const (
DefaultGasLimit = 200000
GasFlagSimulate = "simulate"
FlagUseLedger = "ledger"
FlagChainID = "chain-id"
FlagNode = "node"
FlagHeight = "height"
FlagGas = "gas"
FlagGasAdjustment = "gas-adjustment"
FlagTrustNode = "trust-node"
FlagFrom = "from"
FlagName = "name"
FlagAccountNumber = "account-number"
FlagSequence = "sequence"
FlagMemo = "memo"
FlagFee = "fee"
FlagAsync = "async"
FlagJson = "json"
FlagPrintResponse = "print-response"
FlagDryRun = "dry-run"
FlagGenerateOnly = "generate-only"
FlagIndentResponse= "indent"
FlagUseLedger = "ledger"
FlagChainID = "chain-id"
FlagNode = "node"
FlagHeight = "height"
FlagGas = "gas"
FlagGasAdjustment = "gas-adjustment"
FlagTrustNode = "trust-node"
FlagFrom = "from"
FlagName = "name"
FlagAccountNumber = "account-number"
FlagSequence = "sequence"
FlagMemo = "memo"
FlagFee = "fee"
FlagAsync = "async"
FlagJson = "json"
FlagPrintResponse = "print-response"
FlagDryRun = "dry-run"
FlagGenerateOnly = "generate-only"
FlagIndentResponse = "indent"
)
// LineBreak can be included in a command list to provide a blank line
+2 -2
View File
@@ -372,8 +372,8 @@ func TestCoinSendGenerateSignAndBroadcast(t *testing.T) {
// broadcast tx
broadcastPayload := struct {
Tx auth.StdTx `json:"tx"`
Return string `json:"return"`
Tx auth.StdTx `json:"tx"`
Return string `json:"return"`
}{Tx: signedMsg, Return: "block"}
json, err = cdc.MarshalJSON(broadcastPayload)
require.Nil(t, err)
-1
View File
@@ -141,7 +141,6 @@ func createHandler(cdc *codec.Codec) *mux.Router {
cliCtx := context.NewCLIContext().WithCodec(cdc)
// TODO: make more functional? aka r = keys.RegisterRoutes(r)
r.HandleFunc("/version", CLIVersionRequestHandler).Methods("GET")
r.HandleFunc("/node_version", NodeVersionRequestHandler(cliCtx)).Methods("GET")
+1 -1
View File
@@ -8,11 +8,11 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/utils"
"github.com/gorilla/mux"
"github.com/spf13/cobra"
"github.com/spf13/viper"
tmliteProxy "github.com/tendermint/tendermint/lite/proxy"
"github.com/cosmos/cosmos-sdk/client/utils"
)
//BlockCommand returns the verified block data for a given heights
+1 -2
View File
@@ -41,8 +41,7 @@ func getNodeStatus(cliCtx context.CLIContext) (*ctypes.ResultStatus, error) {
func printNodeStatus(cmd *cobra.Command, args []string) error {
// No need to verify proof in getting node status
viper.Set(client.FlagTrustNode, true)
cliCtx := context.NewCLIContext()
cliCtx := context.NewCLIContext().WithTrustNode(true)
status, err := getNodeStatus(cliCtx)
if err != nil {
return err
+1 -1
View File
@@ -13,11 +13,11 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"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/auth"
"github.com/spf13/viper"
"github.com/cosmos/cosmos-sdk/client/utils"
)
// QueryTxCmd implements the default command for a tx query.
+1 -1
View File
@@ -15,8 +15,8 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
"github.com/cosmos/cosmos-sdk/client/utils"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
)
const (