Commit 5c9961c8 authored by vicotor's avatar vicotor

update

parent cfcd3fab
...@@ -104,6 +104,7 @@ func (s *server) GetCoinInfo(ctx context.Context, request *nodev1.GetCoinInfoReq ...@@ -104,6 +104,7 @@ func (s *server) GetCoinInfo(ctx context.Context, request *nodev1.GetCoinInfoReq
func StartServer(logger log.Logger, grpcPort int, gwPort int, chain chaindb.ChainReader) error { func StartServer(logger log.Logger, grpcPort int, gwPort int, chain chaindb.ChainReader) error {
defer logger.Info("grpc and gateway server stopped") defer logger.Info("grpc and gateway server stopped")
logger.Info("starting grpc and gateway server", "grpcPort", grpcPort, "gwPort", gwPort)
ctx := context.Background() ctx := context.Background()
ctx, cancel := context.WithCancel(ctx) ctx, cancel := context.WithCancel(ctx)
defer cancel() defer cancel()
......
...@@ -84,6 +84,14 @@ func NewConfig(ctx *cli.Context, log log.Logger) (*node.Config, error) { ...@@ -84,6 +84,14 @@ func NewConfig(ctx *cli.Context, log log.Logger) (*node.Config, error) {
ListenPort: ctx.Int(flags.RPCListenPort.Name), ListenPort: ctx.Int(flags.RPCListenPort.Name),
EnableAdmin: ctx.Bool(flags.RPCEnableAdmin.Name), EnableAdmin: ctx.Bool(flags.RPCEnableAdmin.Name),
}, },
GRPC: node.GRPCConfig{
ListenAddr: ctx.String(flags.GRPCListenAddr.Name),
ListenPort: ctx.Int(flags.GRPCListenPort.Name),
},
GW: node.GWConfig{
ListenAddr: ctx.String(flags.GWListenAddr.Name),
ListenPort: ctx.Int(flags.GWListenPort.Name),
},
Metrics: node.MetricsConfig{ Metrics: node.MetricsConfig{
Enabled: ctx.Bool(flags.MetricsEnabledFlag.Name), Enabled: ctx.Bool(flags.MetricsEnabledFlag.Name),
ListenAddr: ctx.String(flags.MetricsAddrFlag.Name), ListenAddr: ctx.String(flags.MetricsAddrFlag.Name),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment