diff options
author | Kurkó Mihály <kurkomisi@users.noreply.github.com> | 2019-05-07 20:49:51 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-05-07 20:49:51 +0800 |
commit | 107c67d74ebfee16616bac92d0c39c8bfc9348ae (patch) | |
tree | 82588f987ee8a345183e03aa2403e1c5cf9695ed /accounts/keystore/passphrase.go | |
parent | c8cf360f29f00d16aacf9a0592dd3621efef0d41 (diff) | |
download | go-tangerine-107c67d74ebfee16616bac92d0c39c8bfc9348ae.tar go-tangerine-107c67d74ebfee16616bac92d0c39c8bfc9348ae.tar.gz go-tangerine-107c67d74ebfee16616bac92d0c39c8bfc9348ae.tar.bz2 go-tangerine-107c67d74ebfee16616bac92d0c39c8bfc9348ae.tar.lz go-tangerine-107c67d74ebfee16616bac92d0c39c8bfc9348ae.tar.xz go-tangerine-107c67d74ebfee16616bac92d0c39c8bfc9348ae.tar.zst go-tangerine-107c67d74ebfee16616bac92d0c39c8bfc9348ae.zip |
accounts, cmd, internal, signer: add note about backing up the keystore (#19432)
* accounts: add note about backing up the keystore
* cmd, accounts: move the printout to accountCreate
* internal, signer: add info when new account is created via rpc
* cmd, internal, signer: split logs
* cmd/geth: make account new output a bit more verbose
Diffstat (limited to 'accounts/keystore/passphrase.go')
-rw-r--r-- | accounts/keystore/passphrase.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/accounts/keystore/passphrase.go b/accounts/keystore/passphrase.go index a0b6cf538..1ced41e99 100644 --- a/accounts/keystore/passphrase.go +++ b/accounts/keystore/passphrase.go @@ -38,6 +38,7 @@ import ( "os" "path/filepath" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/crypto" @@ -97,9 +98,9 @@ func (ks keyStorePassphrase) GetKey(addr common.Address, filename, auth string) } // StoreKey generates a key, encrypts with 'auth' and stores in the given directory -func StoreKey(dir, auth string, scryptN, scryptP int) (common.Address, error) { +func StoreKey(dir, auth string, scryptN, scryptP int) (accounts.Account, error) { _, a, err := storeNewKey(&keyStorePassphrase{dir, scryptN, scryptP, false}, rand.Reader, auth) - return a.Address, err + return a, err } func (ks keyStorePassphrase) StoreKey(filename string, key *Key, auth string) error { |