mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
variable change to private types
This commit is contained in:
parent
b6a923fef8
commit
176f0ab9c9
1 changed files with 4 additions and 4 deletions
|
|
@ -75,10 +75,10 @@ var (
|
|||
|
||||
var (
|
||||
// PinRegexp is the regular expression used to validate PIN codes.
|
||||
PinRegexp = regexp.MustCompile(`^[0-9]{6,}$`)
|
||||
pinRegexp = regexp.MustCompile(`^[0-9]{6,}$`)
|
||||
|
||||
// PukRegexp is the regular expression used to validate PUK codes.
|
||||
PukRegexp = regexp.MustCompile(`^[0-9]{12,}$`)
|
||||
pukRegexp = regexp.MustCompile(`^[0-9]{12,}$`)
|
||||
)
|
||||
|
||||
// List of APDU command-related constants
|
||||
|
|
@ -388,7 +388,7 @@ func (w *Wallet) Open(passphrase string) error {
|
|||
case passphrase == "":
|
||||
return ErrPINUnblockNeeded
|
||||
case status.PinRetryCount > 0:
|
||||
if !PinRegexp.MatchString(passphrase) {
|
||||
if !pinRegexp.MatchString(passphrase) {
|
||||
w.log.Error("PIN needs to be at least 6 digits")
|
||||
return ErrPINNeeded
|
||||
}
|
||||
|
|
@ -396,7 +396,7 @@ func (w *Wallet) Open(passphrase string) error {
|
|||
return err
|
||||
}
|
||||
default:
|
||||
if !PukRegexp.MatchString(passphrase) {
|
||||
if !pukRegexp.MatchString(passphrase) {
|
||||
w.log.Error("PUK needs to be at least 12 digits")
|
||||
return ErrPINUnblockNeeded
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue