forked from cerc-io/plugeth
Fix ignore of unexpected files in key dir
This commit is contained in:
parent
94f2adb80a
commit
9d2a156453
@ -117,13 +117,13 @@ func GetKeyAddresses(keysDirPath string) (addresses [][]byte, err error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
addresses = make([][]byte, len(fileInfos))
|
addresses = *new([][]byte)
|
||||||
for i, fileInfo := range fileInfos {
|
for _, fileInfo := range fileInfos {
|
||||||
address, err := hex.DecodeString(fileInfo.Name())
|
address, err := hex.DecodeString(fileInfo.Name())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
addresses[i] = address
|
addresses = append(addresses, address)
|
||||||
}
|
}
|
||||||
return addresses, err
|
return addresses, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user