aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/keystore/key.go
diff options
context:
space:
mode:
authorWenbiao Zheng <delweng@gmail.com>2018-11-29 18:04:56 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-11-29 18:04:56 +0800
commit32d35c9c088463efac49aeb0f3e6d48cfb373a40 (patch)
treefb414241de45f63e1215edba95d5d432d18f6e1e /accounts/keystore/key.go
parenta4428c505e84aaa1982d4cc522e0c0ffe608890a (diff)
downloaddexon-32d35c9c088463efac49aeb0f3e6d48cfb373a40.tar.gz
dexon-32d35c9c088463efac49aeb0f3e6d48cfb373a40.tar.zst
dexon-32d35c9c088463efac49aeb0f3e6d48cfb373a40.zip
accounts/keystore: delete the redundant keystore in filename (#17930)
* accounts/keystore: reduce file name length * accounts/keystore: reduce code line width
Diffstat (limited to 'accounts/keystore/key.go')
-rw-r--r--accounts/keystore/key.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/accounts/keystore/key.go b/accounts/keystore/key.go
index 0564751c4..84d8df0c5 100644
--- a/accounts/keystore/key.go
+++ b/accounts/keystore/key.go
@@ -171,7 +171,10 @@ func storeNewKey(ks keyStore, rand io.Reader, auth string) (*Key, accounts.Accou
if err != nil {
return nil, accounts.Account{}, err
}
- a := accounts.Account{Address: key.Address, URL: accounts.URL{Scheme: KeyStoreScheme, Path: ks.JoinPath(keyFileName(key.Address))}}
+ a := accounts.Account{
+ Address: key.Address,
+ URL: accounts.URL{Scheme: KeyStoreScheme, Path: ks.JoinPath(keyFileName(key.Address))},
+ }
if err := ks.StoreKey(a.URL.Path, key, auth); err != nil {
zeroKey(key.PrivateKey)
return nil, a, err
@@ -224,5 +227,6 @@ func toISO8601(t time.Time) string {
} else {
tz = fmt.Sprintf("%03d00", offset/3600)
}
- return fmt.Sprintf("%04d-%02d-%02dT%02d-%02d-%02d.%09d%s", t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second(), t.Nanosecond(), tz)
+ return fmt.Sprintf("%04d-%02d-%02dT%02d-%02d-%02d.%09d%s",
+ t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second(), t.Nanosecond(), tz)
}