Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantinzolotarev committed Jul 2, 2023
1 parent 3e0271d commit 8d824c1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
9 changes: 1 addition & 8 deletions pkg/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ type HTTPAgentConfig struct {
Logger log.Logger
// Address is used for the rpc.Listener function.
Address string
// Interval is the interval at which to publish prices in seconds.
//Interval uint32 `hcl:"interval"`
}

// HTTPAgent returns the services that are configured from the Config struct.
Expand Down Expand Up @@ -147,12 +145,7 @@ func (s *HTTPAgent) handlePrices(w http.ResponseWriter, r *http.Request) {
_, _ = io.WriteString(w, `{"error":"failed to check prices"}`)
return
}
//b, err := json.Marshal(prices)
//if err != nil {
// s.log.Errorf("failed to marshal response: %v", err)
// _, _ = io.WriteString(w, `{"error":"failed to marshal json"}`)
// return
//}

for _, p := range prices {
if mErr := s.marshaller.Write(w, p); mErr != nil {
_ = s.marshaller.Write(w, mErr)
Expand Down
11 changes: 0 additions & 11 deletions pkg/prices/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,6 @@ func (g *Cache) update(pair provider.Pair) error {
price := &median.Price{Wat: pair.Base + pair.Quote, Age: tick.Time}
price.SetFloat64Price(tick.Price)

// Broadcast price to P2P network.
//msg, err := toPriceMessage(price, tick)
//if err != nil {
// return err
//}
//if err := g.transport.Broadcast(messages.PriceV0MessageName, msg.AsV0()); err != nil {
// return err
//}
//if err := g.transport.Broadcast(messages.PriceV1MessageName, msg.AsV1()); err != nil {
// return err
//}
return err
}

Expand Down

0 comments on commit 8d824c1

Please # to comment.