Skip to content

Commit

Permalink
[docs] update rollback comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanlott committed Jul 27, 2023
1 parent cb4497d commit 6ce32dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions persistence/trees/trees.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,8 @@ func (t *treeStore) Savepoint() error {
return nil
}

// Rollback rolls back to the last saved worldState maintained by the treeStore.
// Rollback intentionally can't return an error because at this point we're out of tricks
// to recover from problems.
// Rollback returns the treeStore to the last saved worldState maintained by the treeStore.
// If no worldState has been saved, it returns ErrFailedRollback
func (t *treeStore) Rollback() error {
if t.prevState != nil {
t.merkleTrees = t.prevState.merkleTrees
Expand Down

0 comments on commit 6ce32dc

Please sign in to comment.