refactor: use errors.New to replace fmt.Errorf with no parameters (#15007)

Signed-off-by: LesCyber <andi4cing@gmail.com>
This commit is contained in:
LesCyber
2025-04-02 03:03:16 +08:00
committed by GitHub
parent 762594a368
commit 83cf0f8658
2 changed files with 3 additions and 5 deletions

View File

@@ -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 {