diff --git a/aggregator/cmd/main.go b/aggregator/cmd/main.go index 1e3cb3c41..2a5c622b1 100644 --- a/aggregator/cmd/main.go +++ b/aggregator/cmd/main.go @@ -78,7 +78,6 @@ func aggregatorMain(ctx *cli.Context) error { return err } } - go rpcServer.Start() restServer := restserver.NewRestServer(config.AggregatorRestServerIpPortAddr, agg, logger) diff --git a/aggregator/rest_server/server.go b/aggregator/rest_server/server.go index 164cb7169..7a2b9d131 100644 --- a/aggregator/rest_server/server.go +++ b/aggregator/rest_server/server.go @@ -101,6 +101,7 @@ func (s *RestServer) handleGetStateRootUpdateAggregation(w http.ResponseWriter, response, err := s.app.GetStateRootUpdateAggregation(uint32(rollupId), blockHeight) if err != nil { http.Error(w, err.Error(), mapErrorToCode(err)) + return err } w.WriteHeader(http.StatusOK)