diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-05-23 19:58:03 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-05-23 19:58:03 +0800 |
commit | aa73420207cba02a68befdbb8667f1e6ceed3f4d (patch) | |
tree | 76b4fb7ffc9440e7ff27b22dc367355d4fc84f5c /tests | |
parent | 3556962053267def82f1a9f9e97a26f7b7c1450e (diff) | |
download | dexon-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar dexon-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar.gz dexon-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar.bz2 dexon-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar.lz dexon-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar.xz dexon-aa73420207cba02a68befdbb8667f1e6ceed3f4d.tar.zst dexon-aa73420207cba02a68befdbb8667f1e6ceed3f4d.zip |
accounts/keystore, crypto: enforce 256 bit keys on import
Diffstat (limited to 'tests')
-rw-r--r-- | tests/util.go | 5 |
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 |