diff --git a/server/api/server.go b/server/api/server.go index 2ca63509bb..4fdff55e49 100644 --- a/server/api/server.go +++ b/server/api/server.go @@ -117,6 +117,7 @@ func (s *Server) Start(cfg config.Config) error { return tmrpcserver.Serve(s.listener, allowAllCORS(h), s.logger, tmCfg) } + s.logger.Info("starting API server...") return tmrpcserver.Serve(s.listener, s.Router, s.logger, tmCfg) } diff --git a/server/start.go b/server/start.go index 59d3261fa0..6259cede97 100644 --- a/server/start.go +++ b/server/start.go @@ -21,7 +21,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" @@ -108,7 +107,7 @@ which accepts a path for the resulting pprof file. serverCtx.Logger.Info("starting ABCI with Tendermint") // amino is needed here for backwards compatibility of REST routes - err := startInProcess(serverCtx, clientCtx.LegacyAmino, appCreator) + err := startInProcess(serverCtx, clientCtx, appCreator) return err }, } @@ -180,7 +179,7 @@ func startStandAlone(ctx *Context, appCreator types.AppCreator) error { } // legacyAminoCdc is used for the legacy REST API -func startInProcess(ctx *Context, legacyAminoCdc *codec.LegacyAmino, appCreator types.AppCreator) error { +func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.AppCreator) error { cfg := ctx.Config home := cfg.RootDir @@ -230,11 +229,9 @@ func startInProcess(ctx *Context, legacyAminoCdc *codec.LegacyAmino, appCreator return err } - clientCtx := client.Context{}. + clientCtx := clientCtx. WithHomeDir(home). WithChainID(genDoc.ChainID). - // amino is needed here for backwards compatibility of REST routes - WithLegacyAmino(legacyAminoCdc). WithClient(local.New(tmNode)) apiSrv = api.New(clientCtx, ctx.Logger.With("module", "api-server"))