Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
walldiss committed Aug 4, 2023
1 parent bc6a05b commit acbcaeb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions share/eds/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ func (s *Store) Put(ctx context.Context, root share.DataHash, square *rsmt2d.Ext

tnow := time.Now()
err := s.put(ctx, root, square)
result := putOK
switch {
case errors.Is(err, dagstore.ErrShardExists):
s.metrics.observePut(ctx, time.Since(tnow), putExists, square.Width())
result = putExists
case err != nil:
s.metrics.observePut(ctx, time.Since(tnow), putFailed, square.Width())
default:
s.metrics.observePut(ctx, time.Since(tnow), putOK, square.Width())
result = putFailed
}
utils.SetStatusAndEnd(span, err)
s.metrics.observePut(ctx, time.Since(tnow), result, square.Width())
return err
}

Expand Down

0 comments on commit acbcaeb

Please sign in to comment.