mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-23 03:51:29 +00:00
shorten name (#1649)
This commit is contained in:
parent
2425bef5c7
commit
4ee57f1c45
@ -49,10 +49,10 @@ func ensureInt(x interface{}) int {
|
||||
}
|
||||
|
||||
// keyFileName implements the naming convention for keyfiles:
|
||||
// UTC--<created_at UTC ISO8601>-<address hex>
|
||||
// UTC--<created_at UTC ISO8601>-<first 8 character of address hex>
|
||||
func keyFileName(pubkey *bls.PublicKey) string {
|
||||
ts := time.Now().UTC()
|
||||
return fmt.Sprintf("UTC--%s--%s", toISO8601(ts), hex.EncodeToString(pubkey.Marshal()))
|
||||
return fmt.Sprintf("UTC--%s--%s", toISO8601(ts), hex.EncodeToString(pubkey.Marshal())[:8])
|
||||
}
|
||||
|
||||
func toISO8601(t time.Time) string {
|
||||
|
Loading…
Reference in New Issue
Block a user