Skip to content

Commit a737482

Browse files
authored
accounts, cmd: fix typos (#28526)
1 parent 77cb21d commit a737482

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

accounts/abi/argument.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (arguments Arguments) isTuple() bool {
8080
func (arguments Arguments) Unpack(data []byte) ([]interface{}, error) {
8181
if len(data) == 0 {
8282
if len(arguments.NonIndexed()) != 0 {
83-
return nil, errors.New("abi: attempting to unmarshall an empty string while arguments are expected")
83+
return nil, errors.New("abi: attempting to unmarshal an empty string while arguments are expected")
8484
}
8585
return make([]interface{}, 0), nil
8686
}
@@ -95,7 +95,7 @@ func (arguments Arguments) UnpackIntoMap(v map[string]interface{}, data []byte)
9595
}
9696
if len(data) == 0 {
9797
if len(arguments.NonIndexed()) != 0 {
98-
return errors.New("abi: attempting to unmarshall an empty string while arguments are expected")
98+
return errors.New("abi: attempting to unmarshal an empty string while arguments are expected")
9999
}
100100
return nil // Nothing to unmarshal, return
101101
}

accounts/abi/bind/util_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func TestWaitDeployedCornerCases(t *testing.T) {
121121
backend.Commit()
122122
notContentCreation := errors.New("tx is not contract creation")
123123
if _, err := bind.WaitDeployed(ctx, backend, tx); err.Error() != notContentCreation.Error() {
124-
t.Errorf("error missmatch: want %q, got %q, ", notContentCreation, err)
124+
t.Errorf("error mismatch: want %q, got %q, ", notContentCreation, err)
125125
}
126126

127127
// Create a transaction that is not mined.
@@ -131,7 +131,7 @@ func TestWaitDeployedCornerCases(t *testing.T) {
131131
go func() {
132132
contextCanceled := errors.New("context canceled")
133133
if _, err := bind.WaitDeployed(ctx, backend, tx); err.Error() != contextCanceled.Error() {
134-
t.Errorf("error missmatch: want %q, got %q, ", contextCanceled, err)
134+
t.Errorf("error mismatch: want %q, got %q, ", contextCanceled, err)
135135
}
136136
}()
137137

accounts/abi/unpack_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,13 @@ var unpackTests = []unpackTest{
206206
def: `[{"type":"bool"}]`,
207207
enc: "",
208208
want: false,
209-
err: "abi: attempting to unmarshall an empty string while arguments are expected",
209+
err: "abi: attempting to unmarshal an empty string while arguments are expected",
210210
},
211211
{
212212
def: `[{"type":"bytes32","indexed":true},{"type":"uint256","indexed":false}]`,
213213
enc: "",
214214
want: false,
215-
err: "abi: attempting to unmarshall an empty string while arguments are expected",
215+
err: "abi: attempting to unmarshal an empty string while arguments are expected",
216216
},
217217
{
218218
def: `[{"type":"bool","indexed":true},{"type":"uint64","indexed":true}]`,

accounts/keystore/passphrase_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func TestKeyEncryptDecrypt(t *testing.T) {
5454
// Recrypt with a new password and start over
5555
password += "new data appended" // nolint: gosec
5656
if keyjson, err = EncryptKey(key, password, veryLightScryptN, veryLightScryptP); err != nil {
57-
t.Errorf("test %d: failed to recrypt key %v", i, err)
57+
t.Errorf("test %d: failed to re-encrypt key %v", i, err)
5858
}
5959
}
6060
}

accounts/keystore/watch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func (w *watcher) loop() {
125125
if !ok {
126126
return
127127
}
128-
log.Info("Filsystem watcher error", "err", err)
128+
log.Info("Filesystem watcher error", "err", err)
129129
case <-debounce.C:
130130
w.ac.scanAccounts()
131131
rescanTriggered = false

accounts/url_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func TestURLMarshalJSON(t *testing.T) {
5555
url := URL{Scheme: "https", Path: "ethereum.org"}
5656
json, err := url.MarshalJSON()
5757
if err != nil {
58-
t.Errorf("unexpcted error: %v", err)
58+
t.Errorf("unexpected error: %v", err)
5959
}
6060
if string(json) != "\"https://ethereum.org\"" {
6161
t.Errorf("expected: %v, got: %v", "\"https://ethereum.org\"", string(json))
@@ -66,7 +66,7 @@ func TestURLUnmarshalJSON(t *testing.T) {
6666
url := &URL{}
6767
err := url.UnmarshalJSON([]byte("\"https://ethereum.org\""))
6868
if err != nil {
69-
t.Errorf("unexpcted error: %v", err)
69+
t.Errorf("unexpected error: %v", err)
7070
}
7171
if url.Scheme != "https" {
7272
t.Errorf("expected: %v, got: %v", "https", url.Scheme)

0 commit comments

Comments
 (0)