Skip to content

Commit

Permalink
chore: use errors.New to replace fmt.Errorf with no parameters
Browse files Browse the repository at this point in the history
Signed-off-by: ChengenH <[email protected]>
  • Loading branch information
ChengenH committed Dec 12, 2024
1 parent ad3a7fa commit 6285203
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions x/blob/types/params.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package types

import (
"errors"
"fmt"

"github.com/celestiaorg/celestia-app/v3/pkg/appconsts"
Expand Down Expand Up @@ -67,7 +68,7 @@ func validateGasPerBlobByte(v interface{}) error {
}

if gasPerBlobByte == 0 {
return fmt.Errorf("gas per blob byte cannot be 0")
return errors.New("gas per blob byte cannot be 0")
}

return nil
Expand All @@ -81,7 +82,7 @@ func validateGovMaxSquareSize(v interface{}) error {
}

if govMaxSquareSize == 0 {
return fmt.Errorf("gov max square size cannot be zero")
return errors.New("gov max square size cannot be zero")
}

if !square.IsPowerOfTwo(govMaxSquareSize) {
Expand Down
3 changes: 2 additions & 1 deletion x/mint/types/minter.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package types

import (
"errors"
"fmt"
"time"

Expand Down Expand Up @@ -33,7 +34,7 @@ func (m Minter) Validate() error {
return fmt.Errorf("annual provisions %v should be positive", m.AnnualProvisions.String())
}
if m.BondDenom == "" {
return fmt.Errorf("bond denom should not be empty string")
return errors.New("bond denom should not be empty string")
}
return nil
}
Expand Down

0 comments on commit 6285203

Please sign in to comment.