Skip to content

Commit

Permalink
Merge PR cosmos#6810: Add transport flag to start command
Browse files Browse the repository at this point in the history
  • Loading branch information
enfipy authored Jul 21, 2020
1 parent 470465d commit 5d71020
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
const (
flagWithTendermint = "with-tendermint"
flagAddress = "address"
flagTransport = "transport"
flagTraceStore = "trace-store"
flagCPUProfile = "cpu-profile"
FlagMinGasPrices = "minimum-gas-prices"
Expand Down Expand Up @@ -104,6 +105,7 @@ which accepts a path for the resulting pprof file.
cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory")
cmd.Flags().Bool(flagWithTendermint, true, "Run abci app embedded in-process with tendermint")
cmd.Flags().String(flagAddress, "tcp://0.0.0.0:26658", "Listen address")
cmd.Flags().String(flagTransport, "socket", "Transport protocol: socket, grpc")
cmd.Flags().String(flagTraceStore, "", "Enable KVStore tracing to an output file")
cmd.Flags().String(FlagMinGasPrices, "", "Minimum gas prices to accept for transactions; Any fee in a tx must meet this minimum (e.g. 0.01photino;0.0001stake)")
cmd.Flags().IntSlice(FlagUnsafeSkipUpgrades, []int{}, "Skip a set of upgrade heights to continue the old binary")
Expand All @@ -125,6 +127,7 @@ which accepts a path for the resulting pprof file.

func startStandAlone(ctx *Context, appCreator AppCreator) error {
addr := ctx.Viper.GetString(flagAddress)
transport := ctx.Viper.GetString(flagTransport)
home := ctx.Viper.GetString(flags.FlagHome)

db, err := openDB(home)
Expand All @@ -140,7 +143,7 @@ func startStandAlone(ctx *Context, appCreator AppCreator) error {

app := appCreator(ctx.Logger, db, traceWriter, ctx.Viper)

svr, err := server.NewServer(addr, "socket", app)
svr, err := server.NewServer(addr, transport, app)
if err != nil {
return fmt.Errorf("error creating listener: %v", err)
}
Expand Down

0 comments on commit 5d71020

Please sign in to comment.