diff options
author | Matthew Wampler-Doty <matthew.wampler.doty@gmail.com> | 2015-02-28 05:13:31 +0800 |
---|---|---|
committer | Matthew Wampler-Doty <matthew.wampler.doty@gmail.com> | 2015-02-28 05:13:31 +0800 |
commit | 3820a65299831331f215e158d287fe3df3b69ea6 (patch) | |
tree | cf7b435109c646aac576ed98eefefb57e1f27223 /crypto/key_store_test.go | |
parent | 8653db6df0018d08212493e3a3df4677162bdd8f (diff) | |
parent | 0efd6a881afac0b3082f3b1e8780e3438eea5b02 (diff) | |
download | go-tangerine-3820a65299831331f215e158d287fe3df3b69ea6.tar go-tangerine-3820a65299831331f215e158d287fe3df3b69ea6.tar.gz go-tangerine-3820a65299831331f215e158d287fe3df3b69ea6.tar.bz2 go-tangerine-3820a65299831331f215e158d287fe3df3b69ea6.tar.lz go-tangerine-3820a65299831331f215e158d287fe3df3b69ea6.tar.xz go-tangerine-3820a65299831331f215e158d287fe3df3b69ea6.tar.zst go-tangerine-3820a65299831331f215e158d287fe3df3b69ea6.zip |
Merge branch 'publictests' of github.com:ebuchman/go-ethereum into ethash_pow
Diffstat (limited to 'crypto/key_store_test.go')
-rw-r--r-- | crypto/key_store_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/key_store_test.go b/crypto/key_store_test.go index 485d8f536..11531d460 100644 --- a/crypto/key_store_test.go +++ b/crypto/key_store_test.go @@ -2,12 +2,13 @@ package crypto import ( "github.com/ethereum/go-ethereum/crypto/randentropy" + "github.com/ethereum/go-ethereum/ethutil" "reflect" "testing" ) func TestKeyStorePlain(t *testing.T) { - ks := NewKeyStorePlain(DefaultDataDir()) + ks := NewKeyStorePlain(ethutil.DefaultDataDir()) pass := "" // not used but required by API k1, err := ks.GenerateNewKey(randentropy.Reader, pass) if err != nil { @@ -35,7 +36,7 @@ func TestKeyStorePlain(t *testing.T) { } func TestKeyStorePassphrase(t *testing.T) { - ks := NewKeyStorePassphrase(DefaultDataDir()) + ks := NewKeyStorePassphrase(ethutil.DefaultDataDir()) pass := "foo" k1, err := ks.GenerateNewKey(randentropy.Reader, pass) if err != nil { @@ -61,7 +62,7 @@ func TestKeyStorePassphrase(t *testing.T) { } func TestKeyStorePassphraseDecryptionFail(t *testing.T) { - ks := NewKeyStorePassphrase(DefaultDataDir()) + ks := NewKeyStorePassphrase(ethutil.DefaultDataDir()) pass := "foo" k1, err := ks.GenerateNewKey(randentropy.Reader, pass) if err != nil { @@ -89,7 +90,7 @@ func TestImportPreSaleKey(t *testing.T) { // python pyethsaletool.py genwallet // with password "foo" fileContent := "{\"encseed\": \"26d87f5f2bf9835f9a47eefae571bc09f9107bb13d54ff12a4ec095d01f83897494cf34f7bed2ed34126ecba9db7b62de56c9d7cd136520a0427bfb11b8954ba7ac39b90d4650d3448e31185affcd74226a68f1e94b1108e6e0a4a91cdd83eba\", \"ethaddr\": \"d4584b5f6229b7be90727b0fc8c6b91bb427821f\", \"email\": \"gustav.simonsson@gmail.com\", \"btcaddr\": \"1EVknXyFC68kKNLkh6YnKzW41svSRoaAcx\"}" - ks := NewKeyStorePassphrase(DefaultDataDir()) + ks := NewKeyStorePassphrase(ethutil.DefaultDataDir()) pass := "foo" _, err := ImportPreSaleKey(ks, []byte(fileContent), pass) if err != nil { |