From 3810b29f38d00ddb0644a5c65e7526a689861027 Mon Sep 17 00:00:00 2001 From: HuangYi Date: Mon, 14 Mar 2022 09:40:30 +0800 Subject: [PATCH] fix pr suggestion --- internal/store/store.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/store/store.go b/internal/store/store.go index 8e748d6e2..968e1b551 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -580,7 +580,7 @@ func (bs *BlockStore) Close() error { func (bs *BlockStore) Rollback() error { height := bs.Height() if height <= 0 { - return fmt.Errorf("can't rollback height %v", height) + return fmt.Errorf("can't rollback height %d", height) } pruned, err := bs.pruneRange(blockMetaKey(height), blockMetaKey(height+1), removeBlockHash) @@ -589,7 +589,7 @@ func (bs *BlockStore) Rollback() error { } if pruned != 1 { - return fmt.Errorf("the number of rollbacked blocks don't match %v", pruned) + return fmt.Errorf("the number of rollbacked blocks don't match %d", pruned) } if _, err := bs.pruneRange(blockPartKey(height, 0), blockPartKey(height+1, 0), nil); err != nil {