aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/key_store_plain.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-02-25 04:58:42 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-02-25 04:58:42 +0800
commited90efb05b2cfedf36c263f6974b8748d757a543 (patch)
tree934ddd0c2d3ff22a004d727348aaa6fd2d93fec1 /crypto/key_store_plain.go
parent5a43173e5599b0f2eceb057b636bc45c4d51919b (diff)
parent923950ccaaa4f9c1c0cebfbdd99fb0f16c47fd37 (diff)
downloadgo-tangerine-ed90efb05b2cfedf36c263f6974b8748d757a543.tar
go-tangerine-ed90efb05b2cfedf36c263f6974b8748d757a543.tar.gz
go-tangerine-ed90efb05b2cfedf36c263f6974b8748d757a543.tar.bz2
go-tangerine-ed90efb05b2cfedf36c263f6974b8748d757a543.tar.lz
go-tangerine-ed90efb05b2cfedf36c263f6974b8748d757a543.tar.xz
go-tangerine-ed90efb05b2cfedf36c263f6974b8748d757a543.tar.zst
go-tangerine-ed90efb05b2cfedf36c263f6974b8748d757a543.zip
Merge pull request #378 from Gustav-Simonsson/fix_account_manager_tests
Fix key store address hex decoding and accounts test
Diffstat (limited to 'crypto/key_store_plain.go')
-rw-r--r--crypto/key_store_plain.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/key_store_plain.go b/crypto/key_store_plain.go
index 255ae0ed7..338a4a2c3 100644
--- a/crypto/key_store_plain.go
+++ b/crypto/key_store_plain.go
@@ -119,8 +119,11 @@ func GetKeyAddresses(keysDirPath string) (addresses [][]byte, err error) {
}
addresses = make([][]byte, len(fileInfos))
for i, fileInfo := range fileInfos {
- addresses[i] = make([]byte, 40)
- addresses[i] = []byte(fileInfo.Name())
+ address, err := hex.DecodeString(fileInfo.Name())
+ if err != nil {
+ continue
+ }
+ addresses[i] = address
}
return addresses, err
}