Skip to content

Commit

Permalink
fix: return error when rollback disable
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZexiao committed Dec 29, 2023
1 parent 103feac commit 3f7daef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,12 @@ var _ splitstore.Controller = (*RepoKeeper)(nil)
func (r *RepoKeeper) Rollback() error {
ds := r.repo.Datastore()
if ds == nil {
fmt.Println("no blockstore found!")
return fmt.Errorf("no blockstore found!")
}

rb, ok := ds.(splitstore.Controller)
if !ok {
fmt.Println("split store was disabled")
return fmt.Errorf("split store was disabled")
}
err := rb.Rollback()
if err != nil {
Expand Down

0 comments on commit 3f7daef

Please sign in to comment.