From aa73420207cba02a68befdbb8667f1e6ceed3f4d Mon Sep 17 00:00:00 2001 From: Péter Szilágyi Date: Tue, 23 May 2017 14:58:03 +0300 Subject: accounts/keystore, crypto: enforce 256 bit keys on import --- tests/util.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests') 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 -- cgit