Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/ten-protocol/go-ten into je…
Browse files Browse the repository at this point in the history
…nnifer/2751-tenscan-ui-updates
  • Loading branch information
Jennievon committed May 28, 2024
2 parents 4d0815d + 1daffac commit 25df2cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions go/enclave/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,13 @@ func (s *storageImpl) IsBlockAncestor(ctx context.Context, block *types.Block, m

func (s *storageImpl) HealthCheck(ctx context.Context) (bool, error) {
defer s.logDuration("HealthCheck", measure.NewStopwatch())
headBatch, err := s.FetchHeadBatch(ctx)
seqNo, err := s.FetchCurrentSequencerNo(ctx)
if err != nil {
return false, err
}

if headBatch == nil {
return false, fmt.Errorf("head batch is nil")
if seqNo == nil {
return false, fmt.Errorf("no batches are stored")
}

return true, nil
Expand Down

0 comments on commit 25df2cc

Please sign in to comment.