From ee0bf8d924aa0978eb3e6646d401de72667d20a5 Mon Sep 17 00:00:00 2001 From: levisyin <150114626+levisyin@users.noreply.github.com> Date: Tue, 14 Nov 2023 17:17:46 +0800 Subject: [PATCH 1/8] abi/bind: fix typo of 'mismatch' --- accounts/abi/bind/util_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/abi/bind/util_test.go b/accounts/abi/bind/util_test.go index 75fbc91cebfe..b34c5bc2261f 100644 --- a/accounts/abi/bind/util_test.go +++ b/accounts/abi/bind/util_test.go @@ -121,7 +121,7 @@ func TestWaitDeployedCornerCases(t *testing.T) { backend.Commit() notContentCreation := errors.New("tx is not contract creation") if _, err := bind.WaitDeployed(ctx, backend, tx); err.Error() != notContentCreation.Error() { - t.Errorf("error missmatch: want %q, got %q, ", notContentCreation, err) + t.Errorf("error mismatch: want %q, got %q, ", notContentCreation, err) } // Create a transaction that is not mined. @@ -131,7 +131,7 @@ func TestWaitDeployedCornerCases(t *testing.T) { go func() { contextCanceled := errors.New("context canceled") if _, err := bind.WaitDeployed(ctx, backend, tx); err.Error() != contextCanceled.Error() { - t.Errorf("error missmatch: want %q, got %q, ", contextCanceled, err) + t.Errorf("error mismatch: want %q, got %q, ", contextCanceled, err) } }() From 0ec703f64fd0f6e8913b21c4a4778b63848fd044 Mon Sep 17 00:00:00 2001 From: levisyin Date: Tue, 14 Nov 2023 18:26:34 +0800 Subject: [PATCH 2/8] fix typo of mismatch --- signer/fourbyte/4byte.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/signer/fourbyte/4byte.json b/signer/fourbyte/4byte.json index 00f2658fbd2f..4d4e43266566 100644 --- a/signer/fourbyte/4byte.json +++ b/signer/fourbyte/4byte.json @@ -87972,7 +87972,7 @@ "53c194af": "createIco(uint256,uint256,uint256,uint256,uint256,address)", "53c1b31f": "MooToken(uint256,string,string)", "53c1d4cb": "sign(bytes16)", -"53c210eb": "expectedDebtMissmatch()", +"53c210eb": "expectedDebtMismatch()", "53c24064": "EasyMineTokenWallet()", "53c2828f": "rentalBalanceRemaining()", "53c2ddf1": "approveRouter(address,address,uint256)", From ae2bccdc4d9f9d0fa765ca5f6948026f67543de9 Mon Sep 17 00:00:00 2001 From: levisyin Date: Tue, 14 Nov 2023 18:29:21 +0800 Subject: [PATCH 3/8] fix typo of unmarshal --- accounts/abi/argument.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/abi/argument.go b/accounts/abi/argument.go index 2e48d539e0dc..fa5461895af0 100644 --- a/accounts/abi/argument.go +++ b/accounts/abi/argument.go @@ -80,7 +80,7 @@ func (arguments Arguments) isTuple() bool { func (arguments Arguments) Unpack(data []byte) ([]interface{}, error) { if len(data) == 0 { if len(arguments.NonIndexed()) != 0 { - return nil, errors.New("abi: attempting to unmarshall an empty string while arguments are expected") + return nil, errors.New("abi: attempting to unmarshal an empty string while arguments are expected") } return make([]interface{}, 0), nil } @@ -95,7 +95,7 @@ func (arguments Arguments) UnpackIntoMap(v map[string]interface{}, data []byte) } if len(data) == 0 { if len(arguments.NonIndexed()) != 0 { - return errors.New("abi: attempting to unmarshall an empty string while arguments are expected") + return errors.New("abi: attempting to unmarshal an empty string while arguments are expected") } return nil // Nothing to unmarshal, return } From 00f08ffff13a9e9e72173e0abafd8432ff5835de Mon Sep 17 00:00:00 2001 From: levisyin Date: Wed, 15 Nov 2023 14:17:35 +0800 Subject: [PATCH 4/8] fix some typos --- accounts/keystore/passphrase_test.go | 2 +- accounts/keystore/watch.go | 2 +- accounts/url_test.go | 4 ++-- cmd/geth/main.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/accounts/keystore/passphrase_test.go b/accounts/keystore/passphrase_test.go index 1356b317806d..66fead51f487 100644 --- a/accounts/keystore/passphrase_test.go +++ b/accounts/keystore/passphrase_test.go @@ -54,7 +54,7 @@ func TestKeyEncryptDecrypt(t *testing.T) { // Recrypt with a new password and start over password += "new data appended" // nolint: gosec if keyjson, err = EncryptKey(key, password, veryLightScryptN, veryLightScryptP); err != nil { - t.Errorf("test %d: failed to recrypt key %v", i, err) + t.Errorf("test %d: failed to encrypt key %v", i, err) } } } diff --git a/accounts/keystore/watch.go b/accounts/keystore/watch.go index a9f87e7c323e..1bef321cd1f6 100644 --- a/accounts/keystore/watch.go +++ b/accounts/keystore/watch.go @@ -125,7 +125,7 @@ func (w *watcher) loop() { if !ok { return } - log.Info("Filsystem watcher error", "err", err) + log.Info("Filesystem watcher error", "err", err) case <-debounce.C: w.ac.scanAccounts() rescanTriggered = false diff --git a/accounts/url_test.go b/accounts/url_test.go index 239aa06d227b..52be4c558d41 100644 --- a/accounts/url_test.go +++ b/accounts/url_test.go @@ -55,7 +55,7 @@ func TestURLMarshalJSON(t *testing.T) { url := URL{Scheme: "https", Path: "ethereum.org"} json, err := url.MarshalJSON() if err != nil { - t.Errorf("unexpcted error: %v", err) + t.Errorf("unexpected error: %v", err) } if string(json) != "\"https://ethereum.org\"" { t.Errorf("expected: %v, got: %v", "\"https://ethereum.org\"", string(json)) @@ -66,7 +66,7 @@ func TestURLUnmarshalJSON(t *testing.T) { url := &URL{} err := url.UnmarshalJSON([]byte("\"https://ethereum.org\"")) if err != nil { - t.Errorf("unexpcted error: %v", err) + t.Errorf("unexpected error: %v", err) } if url.Scheme != "https" { t.Errorf("expected: %v, got: %v", "https", url.Scheme) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 2d4fe3dc060c..15050cf522fd 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -417,7 +417,7 @@ func startNode(ctx *cli.Context, stack *node.Node, backend ethapi.Backend, isCon continue } if timestamp := time.Unix(int64(done.Latest.Time), 0); time.Since(timestamp) < 10*time.Minute { - log.Info("Synchronisation completed", "latestnum", done.Latest.Number, "latesthash", done.Latest.Hash(), + log.Info("Synchronizations completed", "latestnum", done.Latest.Number, "latesthash", done.Latest.Hash(), "age", common.PrettyAge(timestamp)) stack.Close() } From 403121c72cf9da0ce6632630898b9a489f931ba0 Mon Sep 17 00:00:00 2001 From: levisyin Date: Wed, 15 Nov 2023 14:44:42 +0800 Subject: [PATCH 5/8] Revert "fix typo of mismatch" This reverts commit 0ec703f64fd0f6e8913b21c4a4778b63848fd044. --- signer/fourbyte/4byte.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/signer/fourbyte/4byte.json b/signer/fourbyte/4byte.json index 4d4e43266566..00f2658fbd2f 100644 --- a/signer/fourbyte/4byte.json +++ b/signer/fourbyte/4byte.json @@ -87972,7 +87972,7 @@ "53c194af": "createIco(uint256,uint256,uint256,uint256,uint256,address)", "53c1b31f": "MooToken(uint256,string,string)", "53c1d4cb": "sign(bytes16)", -"53c210eb": "expectedDebtMismatch()", +"53c210eb": "expectedDebtMissmatch()", "53c24064": "EasyMineTokenWallet()", "53c2828f": "rentalBalanceRemaining()", "53c2ddf1": "approveRouter(address,address,uint256)", From 741d77a941acd632861c3267fed8d5d1d65fde58 Mon Sep 17 00:00:00 2001 From: levisyin Date: Wed, 15 Nov 2023 17:30:04 +0800 Subject: [PATCH 6/8] fix ci test --- accounts/abi/unpack_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/abi/unpack_test.go b/accounts/abi/unpack_test.go index 6dd2db0d583d..a7ee1d920250 100644 --- a/accounts/abi/unpack_test.go +++ b/accounts/abi/unpack_test.go @@ -206,13 +206,13 @@ var unpackTests = []unpackTest{ def: `[{"type":"bool"}]`, enc: "", want: false, - err: "abi: attempting to unmarshall an empty string while arguments are expected", + err: "abi: attempting to unmarshal an empty string while arguments are expected", }, { def: `[{"type":"bytes32","indexed":true},{"type":"uint256","indexed":false}]`, enc: "", want: false, - err: "abi: attempting to unmarshall an empty string while arguments are expected", + err: "abi: attempting to unmarshal an empty string while arguments are expected", }, { def: `[{"type":"bool","indexed":true},{"type":"uint64","indexed":true}]`, From 0cf9185db105d3ef30701d8a2ec2c5c83b3abf16 Mon Sep 17 00:00:00 2001 From: levisyin <150114626+levisyin@users.noreply.github.com> Date: Wed, 15 Nov 2023 21:19:09 +0800 Subject: [PATCH 7/8] revert Synchronisation to Synchronzations --- cmd/geth/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 15050cf522fd..2d4fe3dc060c 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -417,7 +417,7 @@ func startNode(ctx *cli.Context, stack *node.Node, backend ethapi.Backend, isCon continue } if timestamp := time.Unix(int64(done.Latest.Time), 0); time.Since(timestamp) < 10*time.Minute { - log.Info("Synchronizations completed", "latestnum", done.Latest.Number, "latesthash", done.Latest.Hash(), + log.Info("Synchronisation completed", "latestnum", done.Latest.Number, "latesthash", done.Latest.Hash(), "age", common.PrettyAge(timestamp)) stack.Close() } From 547992ff8436c39c47187e386806d4c7184d0f9c Mon Sep 17 00:00:00 2001 From: levisyin <150114626+levisyin@users.noreply.github.com> Date: Wed, 15 Nov 2023 21:20:35 +0800 Subject: [PATCH 8/8] Update passphrase_test.go --- accounts/keystore/passphrase_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/keystore/passphrase_test.go b/accounts/keystore/passphrase_test.go index 66fead51f487..1de43a96daba 100644 --- a/accounts/keystore/passphrase_test.go +++ b/accounts/keystore/passphrase_test.go @@ -54,7 +54,7 @@ func TestKeyEncryptDecrypt(t *testing.T) { // Recrypt with a new password and start over password += "new data appended" // nolint: gosec if keyjson, err = EncryptKey(key, password, veryLightScryptN, veryLightScryptP); err != nil { - t.Errorf("test %d: failed to encrypt key %v", i, err) + t.Errorf("test %d: failed to re-encrypt key %v", i, err) } } }