Skip to content

Commit

Permalink
Add --node flag to startup to support standalone comet
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Oct 13, 2023
1 parent 88dd555 commit 3b466bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ const (

// mempool flags
FlagMempoolMaxTxs = "mempool.max-txs"

// standalone node flags
FlagNode = "node"
)

// StartCmdOptions defines options that can be customized in `StartCmdWithOptions`,
Expand Down Expand Up @@ -220,6 +223,7 @@ is performed. Note, when enabled, gRPC will also be automatically enabled.
cmd.Flags().Bool(FlagDisableIAVLFastNode, false, "Disable fast node for IAVL tree")
cmd.Flags().Int(FlagMempoolMaxTxs, mempool.DefaultMaxTx, "Sets MaxTx value for the app-side mempool")
cmd.Flags().Duration(FlagShutdownGrace, 0*time.Second, "On Shutdown, duration to wait for resource clean up")
cmd.Flags().String(FlagNode, "tcp://localhost:26657", "<host>:<port> to CometBFT RPC interface for this chain")

// support old flags name for backwards compatibility
cmd.Flags().SetNormalizeFunc(func(f *pflag.FlagSet, name string) pflag.NormalizedName {
Expand Down Expand Up @@ -283,7 +287,7 @@ func startStandAlone(svrCtx *Context, svrCfg serverconfig.Config, clientCtx clie
if svrCfg.GRPC.Enable {
// create tendermint client
// assumes the rpc listen address is where tendermint has its rpc server
rpcclient, err := rpchttp.New(svrCtx.Config.RPC.ListenAddress, "/websocket")
rpcclient, err := rpchttp.New(clientCtx.NodeURI, "/websocket")
if err != nil {
return err
}
Expand Down

0 comments on commit 3b466bd

Please sign in to comment.