aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-05-23 19:58:03 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-05-23 19:58:03 +0800
commitaa73420207cba02a68befdbb8667f1e6ceed3f4d (patch)
tree76b4fb7ffc9440e7ff27b22dc367355d4fc84f5c /tests
parent3556962053267def82f1a9f9e97a26f7b7c1450e (diff)
downloadgo-tangerine-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar.gz
go-tangerine-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar.zst
go-tangerine-aa73420207cba02a68befdbb8667f1e6ceed3f4d.zip
accounts/keystore, crypto: enforce 256 bit keys on import
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