mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +00:00
accounts: fix some typos (#25551)
This commit is contained in:
parent
08fedbb503
commit
c046f36afd
6 changed files with 8 additions and 8 deletions
|
|
@ -32,7 +32,7 @@ type reflectTest struct {
|
||||||
|
|
||||||
var reflectTests = []reflectTest{
|
var reflectTests = []reflectTest{
|
||||||
{
|
{
|
||||||
name: "OneToOneCorrespondance",
|
name: "OneToOneCorrespondence",
|
||||||
args: []string{"fieldA"},
|
args: []string{"fieldA"},
|
||||||
struc: struct {
|
struc: struct {
|
||||||
FieldA int `abi:"fieldA"`
|
FieldA int `abi:"fieldA"`
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,7 @@ func waitForAccounts(wantAccounts []accounts.Account, ks *KeyStore) error {
|
||||||
func TestUpdatedKeyfileContents(t *testing.T) {
|
func TestUpdatedKeyfileContents(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
// Create a temporary kesytore to test with
|
// Create a temporary keystore to test with
|
||||||
rand.Seed(time.Now().UnixNano())
|
rand.Seed(time.Now().UnixNano())
|
||||||
dir := filepath.Join(os.TempDir(), fmt.Sprintf("eth-keystore-updatedkeyfilecontents-test-%d-%d", os.Getpid(), rand.Int()))
|
dir := filepath.Join(os.TempDir(), fmt.Sprintf("eth-keystore-updatedkeyfilecontents-test-%d-%d", os.Getpid(), rand.Int()))
|
||||||
ks := NewKeyStore(dir, LightScryptN, LightScryptP)
|
ks := NewKeyStore(dir, LightScryptN, LightScryptP)
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ type fileCache struct {
|
||||||
func (fc *fileCache) scan(keyDir string) (mapset.Set, mapset.Set, mapset.Set, error) {
|
func (fc *fileCache) scan(keyDir string) (mapset.Set, mapset.Set, mapset.Set, error) {
|
||||||
t0 := time.Now()
|
t0 := time.Now()
|
||||||
|
|
||||||
// List all the failes from the keystore folder
|
// List all the files from the keystore folder
|
||||||
files, err := os.ReadDir(keyDir)
|
files, err := os.ReadDir(keyDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, nil, err
|
return nil, nil, nil, err
|
||||||
|
|
@ -61,7 +61,7 @@ func (fc *fileCache) scan(keyDir string) (mapset.Set, mapset.Set, mapset.Set, er
|
||||||
log.Trace("Ignoring file on account scan", "path", path)
|
log.Trace("Ignoring file on account scan", "path", path)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// Gather the set of all and fresly modified files
|
// Gather the set of all and freshly modified files
|
||||||
all.Add(path)
|
all.Add(path)
|
||||||
|
|
||||||
info, err := fi.Info()
|
info, err := fi.Info()
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ func TestSignRace(t *testing.T) {
|
||||||
// Tests that the wallet notifier loop starts and stops correctly based on the
|
// Tests that the wallet notifier loop starts and stops correctly based on the
|
||||||
// addition and removal of wallet event subscriptions.
|
// addition and removal of wallet event subscriptions.
|
||||||
func TestWalletNotifierLifecycle(t *testing.T) {
|
func TestWalletNotifierLifecycle(t *testing.T) {
|
||||||
// Create a temporary kesytore to test with
|
// Create a temporary keystore to test with
|
||||||
_, ks := tmpKeyStore(t, false)
|
_, ks := tmpKeyStore(t, false)
|
||||||
|
|
||||||
// Ensure that the notification updater is not running yet
|
// Ensure that the notification updater is not running yet
|
||||||
|
|
|
||||||
|
|
@ -197,10 +197,10 @@ func (w *trezorDriver) trezorDerive(derivationPath []uint32) (common.Address, er
|
||||||
if _, err := w.trezorExchange(&trezor.EthereumGetAddress{AddressN: derivationPath}, address); err != nil {
|
if _, err := w.trezorExchange(&trezor.EthereumGetAddress{AddressN: derivationPath}, address); err != nil {
|
||||||
return common.Address{}, err
|
return common.Address{}, err
|
||||||
}
|
}
|
||||||
if addr := address.GetAddressBin(); len(addr) > 0 { // Older firmwares use binary fomats
|
if addr := address.GetAddressBin(); len(addr) > 0 { // Older firmwares use binary formats
|
||||||
return common.BytesToAddress(addr), nil
|
return common.BytesToAddress(addr), nil
|
||||||
}
|
}
|
||||||
if addr := address.GetAddressHex(); len(addr) > 0 { // Newer firmwares use hexadecimal fomats
|
if addr := address.GetAddressHex(); len(addr) > 0 { // Newer firmwares use hexadecimal formats
|
||||||
return common.HexToAddress(addr), nil
|
return common.HexToAddress(addr), nil
|
||||||
}
|
}
|
||||||
return common.Address{}, errors.New("missing derived address")
|
return common.Address{}, errors.New("missing derived address")
|
||||||
|
|
|
||||||
|
|
@ -380,7 +380,7 @@ func (w *wallet) selfDerive() {
|
||||||
// of legacy-ledger, the first account on the legacy-path will
|
// of legacy-ledger, the first account on the legacy-path will
|
||||||
// be shown to the user, even if we don't actively track it
|
// be shown to the user, even if we don't actively track it
|
||||||
if i < len(nextAddrs)-1 {
|
if i < len(nextAddrs)-1 {
|
||||||
w.log.Info("Skipping trakcking first account on legacy path, use personal.deriveAccount(<url>,<path>, false) to track",
|
w.log.Info("Skipping tracking first account on legacy path, use personal.deriveAccount(<url>,<path>, false) to track",
|
||||||
"path", path, "address", nextAddrs[i])
|
"path", path, "address", nextAddrs[i])
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue