aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/key_store_plain.go5
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
}