From be9b4a7fc018de0912c8de49f2cac21b90c9cebc Mon Sep 17 00:00:00 2001 From: William Banfield Date: Thu, 19 May 2022 12:43:19 -0400 Subject: [PATCH] use errorf instead of sprintf in panic --- internal/store/store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/store/store.go b/internal/store/store.go index 7b8679b69..ec9e27205 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -498,7 +498,7 @@ func (bs *BlockStore) SaveBlockWithExtendedCommit(block *types.Block, blockParts panic("BlockStore can only save a non-nil block") } if err := seenExtendedCommit.EnsureExtensions(); err != nil { - panic(fmt.Sprintf("saving block with extensions %w", err)) + panic(fmt.Errorf("saving block with extensions %w", err)) } batch := bs.db.NewBatch() if err := bs.saveBlockToBatch(batch, block, blockParts, seenExtendedCommit.ToCommit()); err != nil {