aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-04-06 01:31:18 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-04-07 18:48:19 +0800
commit3f306f63d48f011a527e301e3bf9aec2d6efb7e1 (patch)
tree527dc3f1c6a0ededd135c4fe7236454a3a300308 /core/vm
parent7c583f82228fb373dd6bbe15effb68cf5aac0ad9 (diff)
downloaddexon-3f306f63d48f011a527e301e3bf9aec2d6efb7e1.tar.gz
dexon-3f306f63d48f011a527e301e3bf9aec2d6efb7e1.tar.zst
dexon-3f306f63d48f011a527e301e3bf9aec2d6efb7e1.zip
Forward and log EC recover err and remove dup pubkey len check
Diffstat (limited to 'core/vm')
-rw-r--r--core/vm/address.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/vm/address.go b/core/vm/address.go
index df801863f..c6db1d5ff 100644
--- a/core/vm/address.go
+++ b/core/vm/address.go
@@ -5,6 +5,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
+ "github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/params"
)
@@ -80,9 +81,10 @@ func ecrecoverFunc(in []byte) []byte {
// v needs to be moved to the end
rsv := append(in[64:128], byte(v.Uint64()))
- pubKey := crypto.Ecrecover(in[:32], rsv)
+ pubKey, err := crypto.Ecrecover(in[:32], rsv)
// make sure the public key is a valid one
- if pubKey == nil || len(pubKey) != 65 {
+ if err != nil {
+ glog.V(0).Infof("EC RECOVER FAIL: ", err)
return nil
}