mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-02 17:43:48 +00:00
Fixed key import for empty entries
This commit is contained in:
parent
3889785017
commit
6151ae7db5
1 changed files with 5 additions and 1 deletions
|
|
@ -74,8 +74,12 @@ func NewKeyRingFromString(content string) (*KeyRing, error) {
|
|||
} else if len(words) != 1 {
|
||||
return nil, fmt.Errorf("Unrecognised key format")
|
||||
}
|
||||
secrets = append(secrets, ethutil.Hex2Bytes(secret))
|
||||
|
||||
if len(secret) != 0 {
|
||||
secrets = append(secrets, ethutil.Hex2Bytes(secret))
|
||||
}
|
||||
}
|
||||
|
||||
return NewKeyRingFromSecrets(secrets)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue