accounts/keystore: delete the redundant keystore in filename (#17930)

* accounts/keystore: reduce file name length

* accounts/keystore: reduce code line width
This commit is contained in:
Wenbiao Zheng
2018-11-29 18:04:56 +08:00
committed by Péter Szilágyi
parent a4428c505e
commit 32d35c9c08
8 changed files with 18 additions and 4 deletions

View File

@ -38,7 +38,13 @@ func importPreSaleKey(keyStore keyStore, keyJSON []byte, password string) (accou
return accounts.Account{}, nil, err
}
key.Id = uuid.NewRandom()
a := accounts.Account{Address: key.Address, URL: accounts.URL{Scheme: KeyStoreScheme, Path: keyStore.JoinPath(keyFileName(key.Address))}}
a := accounts.Account{
Address: key.Address,
URL: accounts.URL{
Scheme: KeyStoreScheme,
Path: keyStore.JoinPath(keyFileName(key.Address)),
},
}
err = keyStore.StoreKey(a.URL.Path, key, password)
return a, key, err
}