mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 11:20:45 +00:00
Address pull request comments
* Further simplify "constructor" function's allocation of structs * Fix formatting
This commit is contained in:
parent
3cf038f300
commit
d48140cab3
2 changed files with 4 additions and 9 deletions
|
|
@ -89,10 +89,7 @@ type keyStorePassphrase struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewKeyStorePassphrase(path string) KeyStore2 {
|
func NewKeyStorePassphrase(path string) KeyStore2 {
|
||||||
ks := &keyStorePassphrase{
|
return &keyStorePassphrase{path}
|
||||||
keysDirPath : path,
|
|
||||||
}
|
|
||||||
return ks
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ks keyStorePassphrase) GenerateNewKey(rand io.Reader, auth string) (key *Key, err error) {
|
func (ks keyStorePassphrase) GenerateNewKey(rand io.Reader, auth string) (key *Key, err error) {
|
||||||
|
|
|
||||||
|
|
@ -54,9 +54,7 @@ func DefaultDataDir() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewKeyStorePlain(path string) KeyStore2 {
|
func NewKeyStorePlain(path string) KeyStore2 {
|
||||||
ks := new(keyStorePlain)
|
return &keyStorePlain{path}
|
||||||
ks.keysDirPath = path
|
|
||||||
return ks
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ks keyStorePlain) GenerateNewKey(rand io.Reader, auth string) (key *Key, err error) {
|
func (ks keyStorePlain) GenerateNewKey(rand io.Reader, auth string) (key *Key, err error) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue