aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2017-05-25 04:30:47 +0800
committerGitHub <noreply@github.com>2017-05-25 04:30:47 +0800
commitef25b826e655f8e6a57fc7a05454bf356382bd5f (patch)
treec843d8b5ca0064804e55f5d66dd910c0c106fc05 /tests
parent261b3e235160d30cc7176e02fd0a43f2b60409c6 (diff)
parent136f78ff0a324f7f79296143a6ab7c2dd8a2c37d (diff)
downloadgo-tangerine-ef25b826e655f8e6a57fc7a05454bf356382bd5f.tar.gz
go-tangerine-ef25b826e655f8e6a57fc7a05454bf356382bd5f.tar.zst
go-tangerine-ef25b826e655f8e6a57fc7a05454bf356382bd5f.zip
Merge pull request #14502 from karalabe/mobile-import-ecdsa
Enforce 256 bit keys on raw import, support raw mobile imports
Diffstat (limited to 'tests')
-rw-r--r--tests/util.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/util.go b/tests/util.go
index 7a08e5ed8..a3a9a1f64 100644
--- a/tests/util.go
+++ b/tests/util.go
@@ -18,7 +18,6 @@ package tests
import (
"bytes"
- "encoding/hex"
"fmt"
"math/big"
"os"
@@ -161,8 +160,8 @@ func NewEVMEnvironment(vmTest bool, chainConfig *params.ChainConfig, statedb *st
origin := common.HexToAddress(tx["caller"])
if len(tx["secretKey"]) > 0 {
- key, _ := hex.DecodeString(tx["secretKey"])
- origin = crypto.PubkeyToAddress(crypto.ToECDSA(key).PublicKey)
+ key, _ := crypto.HexToECDSA(tx["secretKey"])
+ origin = crypto.PubkeyToAddress(key.PublicKey)
}
var to *common.Address