Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cristaloleg committed Jul 23, 2024
1 parent 742a2ba commit 9cb41db
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ func (s *Store[H]) Height() uint64 {

head, err := s.Head(ctx)
if err != nil {
// TODO(cristaloleg): log? panic? retry?
return 0
panic(err)
}
return head.Height()
}
Expand Down Expand Up @@ -333,7 +332,7 @@ func (s *Store[H]) Append(ctx context.Context, headers ...H) error {
}
// store header from the disk.
gotHead := head
s.writeHead.CompareAndSwap(nil, &gotHead)
s.writeHead.Store(&gotHead)
} else {
head = *headPtr
}
Expand Down

0 comments on commit 9cb41db

Please sign in to comment.