diff options
author | obscuren <geffobscura@gmail.com> | 2015-05-13 01:05:33 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-05-13 01:05:33 +0800 |
commit | 8e24378cc1acb074b56de75bf0baf6feb7927677 (patch) | |
tree | 71f866652de6b45da5ad4403b88f5def9a684e36 /common/natspec/natspec_e2e_test.go | |
parent | 7d69679935ff8c04aebb60f27074f08c5e84ac95 (diff) | |
parent | 8fe01b4bfa28ad5a1fdde7f9837e8f982843389a (diff) | |
download | go-tangerine-8e24378cc1acb074b56de75bf0baf6feb7927677.tar go-tangerine-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.gz go-tangerine-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.bz2 go-tangerine-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.lz go-tangerine-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.xz go-tangerine-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.zst go-tangerine-8e24378cc1acb074b56de75bf0baf6feb7927677.zip |
Merge branch 'release/0.9.20'v0.9.20
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(`{ |