Skip to content

Commit

Permalink
add documentation and fix lint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
chris124567 committed Jan 3, 2024
1 parent 3d189c7 commit bb8ebca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 2 additions & 0 deletions explorer/explorer.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ func NewExplorer(s Store) *Explorer {
return &Explorer{s: s}
}

// Tip returns the tip of the best known valid chain.
func (e *Explorer) Tip() (types.ChainIndex, error) {
return e.s.Tip()
}

// Block returns the block with the specified ID.
func (e *Explorer) Block(id types.BlockID) (types.Block, error) {
return e.s.Block(id)
}
6 changes: 1 addition & 5 deletions persist/sqlite/txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,5 @@ func (s *Store) ProcessChainRevertUpdate(cru *chain.RevertUpdate) error {
if err := s.applyUpdates(); err != nil {
return err
}
if err := s.deleteBlock(cru.Block.ID()); err != nil {
return err
}

return nil
return s.deleteBlock(cru.Block.ID())
}

0 comments on commit bb8ebca

Please sign in to comment.