aboutsummaryrefslogtreecommitdiffstats
path: root/core/types
diff options
context:
space:
mode:
Diffstat (limited to 'core/types')
-rw-r--r--core/types/transaction.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/types/transaction.go b/core/types/transaction.go
index c381fc5f3..f5392382b 100644
--- a/core/types/transaction.go
+++ b/core/types/transaction.go
@@ -15,6 +15,8 @@ import (
"github.com/ethereum/go-ethereum/rlp"
)
+var ErrInvalidSig = errors.New("invalid v, r, s values")
+
func IsContractAddr(addr []byte) bool {
return len(addr) == 0
}
@@ -177,7 +179,7 @@ func (tx *Transaction) SignatureValues() (v byte, r *big.Int, s *big.Int) {
func (tx *Transaction) publicKey() ([]byte, error) {
if !crypto.ValidateSignatureValues(tx.data.V, tx.data.R, tx.data.S) {
- return nil, errors.New("invalid v, r, s values")
+ return nil, ErrInvalidSig
}
// encode the signature in uncompressed format