Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyaoy committed Oct 16, 2024
1 parent 95e6f40 commit 5a1b2de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions protocol/daemons/slinky/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ func (c *Client) RunMarketPairFetcher(ctx context.Context, appFlags appflags.Fla
}

// RunSidecarVersionChecker periodically calls the sidecarVersionChecker to check if the running sidecar version
// is at least a minimum acceptable version
// is at least a minimum acceptable version.
func (c *Client) RunSidecarVersionChecker(ctx context.Context) {
err := c.sidecarVersionChecker.Start(ctx)
if err != nil {
c.logger.Error("Error initializing sidecarVersionChecker in slinky daemon: %w", err)
c.logger.Error("Error initializing sidecarVersionChecker in slinky daemon", "error", err)
panic(err)
}
ticker := time.NewTicker(SlinkySidecarCheckDelay)
Expand All @@ -196,7 +196,7 @@ func (c *Client) RunSidecarVersionChecker(ctx context.Context) {
}

// StartNewClient creates and runs a Client.
// The client creates the MarketPairFetcher, PriceFetcher, an SidecarVersionChecker,
// The client creates the MarketPairFetcher, PriceFetcher, and SidecarVersionChecker,
// connects to the required grpc services, and launches them in goroutines.
// It is non-blocking and returns on successful startup.
// If it hits a critical error in startup it panics.
Expand Down
8 changes: 4 additions & 4 deletions protocol/daemons/slinky/client/sidecar_version_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ func (s *SidecarVersionCheckerImpl) Stop() {
_ = s.slinky.Stop()
}

func (p *SidecarVersionCheckerImpl) CheckSidecarVersion(ctx context.Context) error {
// get prices from slinky sidecar via GRPC
slinkyResponse, err := p.slinky.Version(ctx, &types.QueryVersionRequest{})
func (s *SidecarVersionCheckerImpl) CheckSidecarVersion(ctx context.Context) error {
// Retrieve sidecar version via gRPC
slinkyResponse, err := s.slinky.Version(ctx, &types.QueryVersionRequest{})
if err != nil {
return err
}
Expand All @@ -67,6 +67,6 @@ func (p *SidecarVersionCheckerImpl) CheckSidecarVersion(ctx context.Context) err
}

// Version is acceptable
p.logger.Info("Sidecar version check passed", "version", current)
s.logger.Info("Sidecar version check passed", "version", current)
return nil
}

0 comments on commit 5a1b2de

Please sign in to comment.