mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 21:08:10 -05:00
refactor: use errors.New to replace fmt.Errorf with no parameters (#15007)
Signed-off-by: LesCyber <andi4cing@gmail.com>
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package checkpoint
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/prysmaticlabs/prysm/v5/beacon-chain/node"
|
||||
"github.com/prysmaticlabs/prysm/v5/beacon-chain/sync/checkpoint"
|
||||
@@ -53,10 +51,10 @@ func BeaconNodeOptions(c *cli.Context) ([]node.Option, error) {
|
||||
return nil, nil
|
||||
}
|
||||
if blockPath != "" && statePath == "" {
|
||||
return nil, fmt.Errorf("--checkpoint-block specified, but not --checkpoint-state. both are required")
|
||||
return nil, errors.New("--checkpoint-block specified, but not --checkpoint-state. both are required")
|
||||
}
|
||||
if blockPath == "" && statePath != "" {
|
||||
return nil, fmt.Errorf("--checkpoint-state specified, but not --checkpoint-block. both are required")
|
||||
return nil, errors.New("--checkpoint-state specified, but not --checkpoint-block. both are required")
|
||||
}
|
||||
|
||||
opt := func(node *node.BeaconNode) (err error) {
|
||||
|
||||
@@ -74,7 +74,7 @@ func AggregateCompressedSignatures(multiSigs [][]byte) (common.Signature, error)
|
||||
// MultipleSignaturesFromBytes creates a group of BLS signatures from a LittleEndian 2d-byte slice.
|
||||
func MultipleSignaturesFromBytes(multiSigs [][]byte) ([]common.Signature, error) {
|
||||
if len(multiSigs) == 0 {
|
||||
return nil, fmt.Errorf("0 signatures provided to the method")
|
||||
return nil, errors.New("0 signatures provided to the method")
|
||||
}
|
||||
for _, s := range multiSigs {
|
||||
if len(s) != fieldparams.BLSSignatureLength {
|
||||
|
||||
Reference in New Issue
Block a user