diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-04-25 05:37:42 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-04-25 05:37:42 +0800 |
commit | 7afbd0f20d39ed3957f696f49da8c159735e95d3 (patch) | |
tree | 1301e9d454753a8e6e7a716f89a81079ef4d020a /crypto | |
parent | c8e21a4d17e144c4c108cf477de594bce776829a (diff) | |
parent | b0bf12ec872587d56b974430efc85c55ce9fe5a9 (diff) | |
download | dexon-7afbd0f20d39ed3957f696f49da8c159735e95d3.tar.gz dexon-7afbd0f20d39ed3957f696f49da8c159735e95d3.tar.zst dexon-7afbd0f20d39ed3957f696f49da8c159735e95d3.zip |
Merge pull request #796 from Gustav-Simonsson/fix_ignoring_of_unexpected_files_in_key_dir
Fix ignore of unexpected files in key dir
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/key_store_plain.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/key_store_plain.go b/crypto/key_store_plain.go index 338a4a2c3..9bbaf1c15 100644 --- a/crypto/key_store_plain.go +++ b/crypto/key_store_plain.go @@ -117,13 +117,12 @@ func GetKeyAddresses(keysDirPath string) (addresses [][]byte, err error) { if err != nil { return nil, err } - addresses = make([][]byte, len(fileInfos)) - for i, fileInfo := range fileInfos { + for _, fileInfo := range fileInfos { address, err := hex.DecodeString(fileInfo.Name()) if err != nil { continue } - addresses[i] = address + addresses = append(addresses, address) } return addresses, err } |