diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-13 01:00:35 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-13 01:00:35 +0800 |
commit | d6357aa616715df1e98cfb90c3aa5372e15cc24b (patch) | |
tree | 3f1792e7d71a82de0ceb6047eaf87f2f72aa82ff /common/natspec/natspec_e2e_test.go | |
parent | 58d6ec689ff44232cd5d6a7cbbaad2d7a2cb44bd (diff) | |
parent | e389585f1f2e77fd7cd507499015bf3754581e4e (diff) | |
download | go-tangerine-d6357aa616715df1e98cfb90c3aa5372e15cc24b.tar go-tangerine-d6357aa616715df1e98cfb90c3aa5372e15cc24b.tar.gz go-tangerine-d6357aa616715df1e98cfb90c3aa5372e15cc24b.tar.bz2 go-tangerine-d6357aa616715df1e98cfb90c3aa5372e15cc24b.tar.lz go-tangerine-d6357aa616715df1e98cfb90c3aa5372e15cc24b.tar.xz go-tangerine-d6357aa616715df1e98cfb90c3aa5372e15cc24b.tar.zst go-tangerine-d6357aa616715df1e98cfb90c3aa5372e15cc24b.zip |
Merge pull request #631 from Gustav-Simonsson/improve_key_store_crypto
Improve key store crypto
Diffstat (limited to 'common/natspec/natspec_e2e_test.go')
-rw-r--r-- | common/natspec/natspec_e2e_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/common/natspec/natspec_e2e_test.go b/common/natspec/natspec_e2e_test.go index f9b0c1dcc..a8d318b57 100644 --- a/common/natspec/natspec_e2e_test.go +++ b/common/natspec/natspec_e2e_test.go @@ -4,6 +4,7 @@ import ( "fmt" "io/ioutil" "os" + "strings" "testing" "github.com/ethereum/go-ethereum/accounts" @@ -84,7 +85,7 @@ type testFrontend struct { } func (self *testFrontend) UnlockAccount(acc []byte) bool { - self.ethereum.AccountManager().Unlock(acc, "password") + self.ethereum.AccountManager().Unlock(common.BytesToAddress(acc), "password") return true } @@ -103,19 +104,19 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { os.RemoveAll("/tmp/eth-natspec/") - err = os.MkdirAll("/tmp/eth-natspec/keys", os.ModePerm) + err = os.MkdirAll("/tmp/eth-natspec/keystore", os.ModePerm) if err != nil { panic(err) } // create a testAddress - ks := crypto.NewKeyStorePassphrase("/tmp/eth-natspec/keys") + ks := crypto.NewKeyStorePassphrase("/tmp/eth-natspec/keystore") am := accounts.NewManager(ks) testAccount, err := am.NewAccount("password") if err != nil { panic(err) } - testAddress := common.Bytes2Hex(testAccount.Address) + testAddress := strings.TrimPrefix(testAccount.Address.Hex(), "0x") // set up mock genesis with balance on the testAddress core.GenesisData = []byte(`{ |