Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accounts, cmd, internal, signer: add note about backing up the keystore #19432

Merged
merged 5 commits into from
May 7, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
accounts: add note about backing up the keystore
  • Loading branch information
Kurkó Mihály committed Apr 25, 2019
commit d6d3bdef079504059c1d9a73ef14f4f46ddb6f83
2 changes: 2 additions & 0 deletions accounts/keystore/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ func storeNewKey(ks keyStore, rand io.Reader, auth string) (*Key, accounts.Accou
zeroKey(key.PrivateKey)
return nil, a, err
}
fmt.Printf("Your new key is generated. Please backup the key file: %s\n", a.URL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used from other locations aswell, we shouldn't fmt.Printf from within a lower library. If you modify StoreKey instead, which is only called from accountCreate, then you can pick out the URL from the returned account, and either do the printout there, or -- better, return the entire account instead of just the address

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I returned the entire account instead of just the address.


return key, a, err
}

Expand Down