Merge PR #6810: Add transport flag to start command
This commit is contained in:
parent
470465d792
commit
5d71020270
|
@ -30,6 +30,7 @@ import (
|
||||||
const (
|
const (
|
||||||
flagWithTendermint = "with-tendermint"
|
flagWithTendermint = "with-tendermint"
|
||||||
flagAddress = "address"
|
flagAddress = "address"
|
||||||
|
flagTransport = "transport"
|
||||||
flagTraceStore = "trace-store"
|
flagTraceStore = "trace-store"
|
||||||
flagCPUProfile = "cpu-profile"
|
flagCPUProfile = "cpu-profile"
|
||||||
FlagMinGasPrices = "minimum-gas-prices"
|
FlagMinGasPrices = "minimum-gas-prices"
|
||||||
|
@ -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().String(flags.FlagHome, defaultNodeHome, "The application home directory")
|
||||||
cmd.Flags().Bool(flagWithTendermint, true, "Run abci app embedded in-process with tendermint")
|
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(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(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().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")
|
cmd.Flags().IntSlice(FlagUnsafeSkipUpgrades, []int{}, "Skip a set of upgrade heights to continue the old binary")
|
||||||
|
@ -125,6 +127,7 @@ which accepts a path for the resulting pprof file.
|
||||||
|
|
||||||
func startStandAlone(ctx *Context, appCreator AppCreator) error {
|
func startStandAlone(ctx *Context, appCreator AppCreator) error {
|
||||||
addr := ctx.Viper.GetString(flagAddress)
|
addr := ctx.Viper.GetString(flagAddress)
|
||||||
|
transport := ctx.Viper.GetString(flagTransport)
|
||||||
home := ctx.Viper.GetString(flags.FlagHome)
|
home := ctx.Viper.GetString(flags.FlagHome)
|
||||||
|
|
||||||
db, err := openDB(home)
|
db, err := openDB(home)
|
||||||
|
@ -140,7 +143,7 @@ func startStandAlone(ctx *Context, appCreator AppCreator) error {
|
||||||
|
|
||||||
app := appCreator(ctx.Logger, db, traceWriter, ctx.Viper)
|
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 {
|
if err != nil {
|
||||||
return fmt.Errorf("error creating listener: %v", err)
|
return fmt.Errorf("error creating listener: %v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue