mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Change address in keystore
This commit is contained in:
parent
9b13f2279e
commit
239f9702ce
2 changed files with 4 additions and 2 deletions
|
|
@ -205,7 +205,8 @@ func writeKeyFile(file string, content []byte) error {
|
|||
// UTC--<created_at UTC ISO8601>-<address hex>
|
||||
func keyFileName(keyAddr common.Address) string {
|
||||
ts := time.Now().UTC()
|
||||
return fmt.Sprintf("UTC--%s--%s", toISO8601(ts), hex.EncodeToString(keyAddr[:]))
|
||||
// return fmt.Sprintf("UTC--%s--%s", toISO8601(ts), hex.EncodeToString(keyAddr[:]))
|
||||
return fmt.Sprintf("UTC--%s--%s", toISO8601(ts), keyAddr.String())
|
||||
}
|
||||
|
||||
func toISO8601(t time.Time) string {
|
||||
|
|
|
|||
|
|
@ -152,7 +152,8 @@ func EncryptKey(key *Key, auth string, scryptN, scryptP int) ([]byte, error) {
|
|||
MAC: hex.EncodeToString(mac),
|
||||
}
|
||||
encryptedKeyJSONV3 := encryptedKeyJSONV3{
|
||||
hex.EncodeToString(key.Address[:]),
|
||||
// hex.EncodeToString(key.Address[:]),
|
||||
key.Address.String(),
|
||||
cryptoStruct,
|
||||
key.Id.String(),
|
||||
version,
|
||||
|
|
|
|||
Loading…
Reference in a new issue