Skip to content

Commit

Permalink
Fix linter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ian0371 committed Jun 26, 2024
1 parent 41d39cd commit ad5cbbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/api_public_transaction_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,10 @@ func (s *PublicTransactionPoolAPI) RecoverFromMessage(
ctx context.Context, address common.Address, data, sig hexutil.Bytes, blockNumber rpc.BlockNumber,
) (common.Address, error) {
if len(sig) != crypto.SignatureLength {
return common.Address{}, fmt.Errorf("signature must be 65 bytes long")
return common.Address{}, errors.New("signature must be 65 bytes long")
}
if sig[crypto.RecoveryIDOffset] != 27 && sig[crypto.RecoveryIDOffset] != 28 {
return common.Address{}, fmt.Errorf("invalid signature (V is not 27 or 28)")
return common.Address{}, errors.New("invalid signature (V is not 27 or 28)")
}

// Transform yellow paper V from 27/28 to 0/1
Expand Down

0 comments on commit ad5cbbf

Please sign in to comment.