use errorf instead of sprintf in panic

This commit is contained in:
William Banfield
2022-05-19 12:43:19 -04:00
parent 4e05b5f108
commit be9b4a7fc0
+1 -1
View File
@@ -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 {