Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jianoaix committed Dec 11, 2024
1 parent e5a1126 commit 5498785
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions disperser/dataapi/operator_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ func (oh *operatorHandler) getOperatorsStake(ctx context.Context, operatorId str
func (s *operatorHandler) scanOperatorsHostInfo(ctx context.Context) (*SemverReportResponse, error) {
currentBlock, err := s.indexedChainState.GetCurrentBlockNumber()
if err != nil {
return nil, fmt.Errorf("failed to fetch current block number - %s", err)
return nil, fmt.Errorf("failed to fetch current block number: %s", err)
}
operators, err := s.indexedChainState.GetIndexedOperators(context.Background(), currentBlock)
if err != nil {
return nil, fmt.Errorf("failed to fetch indexed operator info - %s", err)
return nil, fmt.Errorf("failed to fetch indexed operator info: %s", err)
}

// check operator socket registration against the indexed state
Expand All @@ -134,7 +134,7 @@ func (s *operatorHandler) scanOperatorsHostInfo(ctx context.Context) (*SemverRep
s.logger.Info("Queried indexed operators", "operators", len(operators), "block", currentBlock)
operatorState, err := s.chainState.GetOperatorState(context.Background(), currentBlock, []core.QuorumID{0, 1, 2})
if err != nil {
return nil, fmt.Errorf("failed to fetch operator state - %s", err)
return nil, fmt.Errorf("failed to fetch operator state: %s", err)
}

nodeInfoWorkers := 20
Expand Down
2 changes: 1 addition & 1 deletion disperser/dataapi/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ func (s *server) OperatorsStake(c *gin.Context) {
operatorsStakeResponse, err := s.operatorHandler.getOperatorsStake(c.Request.Context(), operatorId)
if err != nil {
s.metrics.IncrementFailedRequestNum("OperatorsStake")
errorResponse(c, fmt.Errorf("failed to get operator stake - %s", err))
errorResponse(c, fmt.Errorf("failed to get operator stake: %w", err))
return
}

Expand Down

0 comments on commit 5498785

Please sign in to comment.