Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use errors.New to replace fmt.Errorf with no parameters #4113

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading