From 3f7daefe6514139537839169b9861119002fb64c Mon Sep 17 00:00:00 2001 From: tanlang Date: Fri, 29 Dec 2023 16:34:24 +0800 Subject: [PATCH] fix: return error when rollback disable --- app/node/node.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/node/node.go b/app/node/node.go index 25debf4086..b0fb6b0177 100644 --- a/app/node/node.go +++ b/app/node/node.go @@ -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 {