mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
accounts: replace passPHRASE with passWORD in any user interactions (#19932)
This commit is contained in:
parent
6a7b539c0e
commit
e90df44b43
7 changed files with 9 additions and 9 deletions
|
|
@ -35,7 +35,7 @@ var ErrNotSupported = errors.New("not supported")
|
|||
|
||||
// ErrInvalidPassphrase is returned when a decryption operation receives a bad
|
||||
// passphrase.
|
||||
var ErrInvalidPassphrase = errors.New("invalid passphrase")
|
||||
var ErrInvalidPassphrase = errors.New("invalid password")
|
||||
|
||||
// ErrWalletAlreadyOpen is returned if a wallet is attempted to be opened the
|
||||
// second time.
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ import (
|
|||
var (
|
||||
ErrLocked = accounts.NewAuthNeededError("password or unlock")
|
||||
ErrNoMatch = errors.New("no key for given address or file")
|
||||
ErrDecrypt = errors.New("could not decrypt key with given passphrase")
|
||||
ErrDecrypt = errors.New("could not decrypt key with given password")
|
||||
)
|
||||
|
||||
// KeyStoreType is the reflect type of a keystore backend.
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ func TestKeyStorePassphraseDecryptionFail(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
if _, err = ks.GetKey(k1.Address, account.URL.Path, "bar"); err != ErrDecrypt {
|
||||
t.Fatalf("wrong error for invalid passphrase\ngot %q\nwant %q", err, ErrDecrypt)
|
||||
t.Fatalf("wrong error for invalid password\ngot %q\nwant %q", err, ErrDecrypt)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
2
accounts/keystore/testdata/keystore/README
vendored
2
accounts/keystore/testdata/keystore/README
vendored
|
|
@ -1,5 +1,5 @@
|
|||
This directory contains accounts for testing.
|
||||
The passphrase that unlocks them is "foobar".
|
||||
The password that unlocks them is "foobar".
|
||||
|
||||
The "good" key files which are supposed to be loadable are:
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ func TestWalletImportBadPassword(t *testing.T) {
|
|||
XDC.Expect(`
|
||||
!! Unsupported terminal, password will be echoed.
|
||||
Passphrase: {{.InputLine "wrong"}}
|
||||
Fatal: could not decrypt key with given passphrase
|
||||
Fatal: could not decrypt key with given password
|
||||
`)
|
||||
}
|
||||
|
||||
|
|
@ -219,7 +219,7 @@ Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 2/3
|
|||
Passphrase: {{.InputLine "wrong2"}}
|
||||
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 3/3
|
||||
Passphrase: {{.InputLine "wrong3"}}
|
||||
Fatal: Failed to unlock account f466859ead1932d743d622cb74fc058882e8648a (could not decrypt key with given passphrase)
|
||||
Fatal: Failed to unlock account f466859ead1932d743d622cb74fc058882e8648a (could not decrypt key with given password)
|
||||
`)
|
||||
}
|
||||
|
||||
|
|
@ -281,7 +281,7 @@ func TestUnlockFlagPasswordFileWrongPassword(t *testing.T) {
|
|||
"--password", "testdata/wrong-passwords.txt", "--unlock", "0,2")
|
||||
defer XDC.ExpectExit()
|
||||
XDC.Expect(`
|
||||
Fatal: Failed to unlock account 0 (could not decrypt key with given passphrase)
|
||||
Fatal: Failed to unlock account 0 (could not decrypt key with given password)
|
||||
`)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ func (w *wizard) deployFaucet() {
|
|||
infos.node.keyPass = w.readPassword()
|
||||
|
||||
if _, err := keystore.DecryptKey([]byte(infos.node.keyJSON), infos.node.keyPass); err != nil {
|
||||
log.Error("Failed to decrypt key with given passphrase")
|
||||
log.Error("Failed to decrypt key with given password")
|
||||
infos.node.keyJSON = ""
|
||||
infos.node.keyPass = ""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ func (w *wizard) deployNode(boot bool) {
|
|||
infos.keyPass = w.readPassword()
|
||||
|
||||
if _, err := keystore.DecryptKey([]byte(infos.keyJSON), infos.keyPass); err != nil {
|
||||
log.Error("Failed to decrypt key with given passphrase")
|
||||
log.Error("Failed to decrypt key with given password")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue