aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/key_store_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-23 21:29:01 +0800
committerobscuren <geffobscura@gmail.com>2015-01-23 21:29:01 +0800
commit7a894e37388fccef1fa7945bb20b7cf8f0c1ce3c (patch)
treea6d55756ec833b3651e5805726813a7ef5af3399 /crypto/key_store_test.go
parent215780ab562b940bfc653c16bf84f812ef062821 (diff)
parentd792e95c214c8352e6b23b798101e90844eaa7a3 (diff)
downloaddexon-7a894e37388fccef1fa7945bb20b7cf8f0c1ce3c.tar.gz
dexon-7a894e37388fccef1fa7945bb20b7cf8f0c1ce3c.tar.zst
dexon-7a894e37388fccef1fa7945bb20b7cf8f0c1ce3c.zip
Merge branch 'develop' into jsonrpc
Diffstat (limited to 'crypto/key_store_test.go')
-rw-r--r--crypto/key_store_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/crypto/key_store_test.go b/crypto/key_store_test.go
index 16c0e476d..54efc739a 100644
--- a/crypto/key_store_test.go
+++ b/crypto/key_store_test.go
@@ -83,3 +83,16 @@ func TestKeyStorePassphraseDecryptionFail(t *testing.T) {
t.Fatal(err)
}
}
+
+func TestImportPreSaleKey(t *testing.T) {
+ // file content of a presale key file generated with:
+ // python pyethsaletool.py genwallet
+ // with password "foo"
+ fileContent := "{\"encseed\": \"26d87f5f2bf9835f9a47eefae571bc09f9107bb13d54ff12a4ec095d01f83897494cf34f7bed2ed34126ecba9db7b62de56c9d7cd136520a0427bfb11b8954ba7ac39b90d4650d3448e31185affcd74226a68f1e94b1108e6e0a4a91cdd83eba\", \"ethaddr\": \"d4584b5f6229b7be90727b0fc8c6b91bb427821f\", \"email\": \"gustav.simonsson@gmail.com\", \"btcaddr\": \"1EVknXyFC68kKNLkh6YnKzW41svSRoaAcx\"}"
+ ks := NewKeyStorePassphrase(DefaultDataDir())
+ pass := "foo"
+ _, err := ImportPreSaleKey(ks, []byte(fileContent), pass)
+ if err != nil {
+ t.Fatal(err)
+ }
+}