Skip to content

Commit

Permalink
chore(header/store): fix a weird quible from @adlerjohn
Browse files Browse the repository at this point in the history
  • Loading branch information
Wondertan committed Jun 3, 2022
1 parent b6c3bca commit f0e3e13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion header/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (s *store) Has(_ context.Context, hash tmbytes.HexBytes) (bool, error) {
return s.ds.Has(datastore.NewKey(hash.String()))
}

func (s *store) Append(ctx context.Context, headers ...*header.ExtendedHeader) (_ int, err error) {
func (s *store) Append(ctx context.Context, headers ...*header.ExtendedHeader) (int, error) {
lh := len(headers)
if lh == 0 {
return 0, nil
Expand All @@ -263,6 +263,7 @@ func (s *store) Append(ctx context.Context, headers ...*header.ExtendedHeader) (
defer s.writeLk.Unlock()

// take current write head to verify headers against
var err error
head := s.writeHead
if head == nil {
head, err = s.Head(ctx)
Expand Down

0 comments on commit f0e3e13

Please sign in to comment.