From b75808fd68c28770ede4aafa2c09127d8d2a85cf Mon Sep 17 00:00:00 2001 From: taco-paco Date: Wed, 12 Jun 2024 16:21:03 +0300 Subject: [PATCH] refactor: style edits + error return --- aggregator/cmd/main.go | 1 - aggregator/rest_server/server.go | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/aggregator/cmd/main.go b/aggregator/cmd/main.go index 1e3cb3c4..2a5c622b 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 164cb716..7a2b9d13 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)