From 8a2ba2f66a9507f4d0fb544c1523b75f8e5fc76b Mon Sep 17 00:00:00 2001 From: Gregor Podlogar <gregor.podlogar@flare.network> Date: Tue, 17 Dec 2024 11:42:20 +0100 Subject: [PATCH] log fixed, comments removed --- client/epoch/rewards_utils.go | 1 - client/protocol/protocol_utils.go | 5 ----- client/protocol/submitter.go | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/client/epoch/rewards_utils.go b/client/epoch/rewards_utils.go index a4731a3..f6d9b4e 100644 --- a/client/epoch/rewards_utils.go +++ b/client/epoch/rewards_utils.go @@ -125,7 +125,6 @@ func fetchRewardData(epochId *big.Int, config *config.RewardsConfig) (*rewardDis } rewardsUrl, err := url.JoinPath(config.UrlPrefix, epochId.Text(10), "reward-distribution-data.json") - if err != nil { return nil, errors.Errorf("cannot join url: %s", err) } diff --git a/client/protocol/protocol_utils.go b/client/protocol/protocol_utils.go index 08581fa..b6128da 100644 --- a/client/protocol/protocol_utils.go +++ b/client/protocol/protocol_utils.go @@ -75,11 +75,6 @@ func (sp *SubProtocol) fetchData(url *url.URL, timeout time.Duration) (*SubProto respLimited := &io.LimitedReader{R: resp.Body, N: maxRespSize} - // body, err := io.ReadAll(resp.Body) - // if err != nil { - // return nil, errors.Wrap(err, "error reading protocol client response") - // } - decoder := json.NewDecoder(respLimited) decoder.DisallowUnknownFields() diff --git a/client/protocol/submitter.go b/client/protocol/submitter.go index 885c6c2..bb802c4 100644 --- a/client/protocol/submitter.go +++ b/client/protocol/submitter.go @@ -149,7 +149,7 @@ func (s *Submitter) GetPayload(currentEpoch int64) []byte { } func (s *Submitter) RunEpoch(currentEpoch int64) { - logger.Debugf("Submitter %s running for epoch %d") + logger.Debugf("Submitter %s running for epoch %d", s.name, currentEpoch) payload := s.GetPayload(currentEpoch)