From 7f50fa514665ffec4a150aa27dc91af63c543c2c Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Tue, 14 Jan 2025 10:56:14 +0800 Subject: [PATCH] accounts: lint whitespace (#25312) --- accounts/abi/bind/base_test.go | 1 - accounts/abi/error_handling.go | 1 - accounts/abi/event_test.go | 1 - accounts/abi/reflect.go | 1 - accounts/abi/unpack.go | 1 - accounts/keystore/keystore_test.go | 2 -- accounts/keystore/passphrase.go | 1 - 7 files changed, 8 deletions(-) diff --git a/accounts/abi/bind/base_test.go b/accounts/abi/bind/base_test.go index 7fad9c7bb672..97972b352e85 100644 --- a/accounts/abi/bind/base_test.go +++ b/accounts/abi/bind/base_test.go @@ -115,7 +115,6 @@ func (mc *mockPendingCaller) PendingCallContract(ctx context.Context, call ether } func TestPassingBlockNumber(t *testing.T) { - mc := &mockPendingCaller{ mockCaller: &mockCaller{ codeAtBytes: []byte{1, 2, 3}, diff --git a/accounts/abi/error_handling.go b/accounts/abi/error_handling.go index f0f71b6c9164..7add7072925e 100644 --- a/accounts/abi/error_handling.go +++ b/accounts/abi/error_handling.go @@ -73,7 +73,6 @@ func typeCheck(t Type, value reflect.Value) error { } else { return nil } - } // typeErr returns a formatted type casting error. diff --git a/accounts/abi/event_test.go b/accounts/abi/event_test.go index e5ac31374266..718102660708 100644 --- a/accounts/abi/event_test.go +++ b/accounts/abi/event_test.go @@ -161,7 +161,6 @@ func TestEventMultiValueWithArrayUnpack(t *testing.T) { } func TestEventTupleUnpack(t *testing.T) { - type EventTransfer struct { Value *big.Int } diff --git a/accounts/abi/reflect.go b/accounts/abi/reflect.go index faa62a642bf6..e6d3ad7680f5 100644 --- a/accounts/abi/reflect.go +++ b/accounts/abi/reflect.go @@ -222,7 +222,6 @@ func mapArgNamesToStructFields(argNames []string, value reflect.Value) (map[stri // second round ~~~ for _, argName := range argNames { - structFieldName := ToCamelCase(argName) if structFieldName == "" { diff --git a/accounts/abi/unpack.go b/accounts/abi/unpack.go index 256c2c650b45..a19ff8e38781 100644 --- a/accounts/abi/unpack.go +++ b/accounts/abi/unpack.go @@ -116,7 +116,6 @@ func ReadFixedBytes(t Type, word []byte) (interface{}, error) { reflect.Copy(array, reflect.ValueOf(word[0:t.Size])) return array.Interface(), nil - } // forEachUnpack iteratively unpack elements. diff --git a/accounts/keystore/keystore_test.go b/accounts/keystore/keystore_test.go index 82d576e52174..cada74238e01 100644 --- a/accounts/keystore/keystore_test.go +++ b/accounts/keystore/keystore_test.go @@ -378,7 +378,6 @@ func TestImportExport(t *testing.T) { if _, err = ks2.Import(json, "new", "new"); err == nil { t.Errorf("importing a key twice succeeded") } - } // TestImportRace tests the keystore on races. @@ -403,7 +402,6 @@ func TestImportRace(t *testing.T) { if _, err := ks2.Import(json, "new", "new"); err != nil { atomic.AddUint32(&atom, 1) } - }() } wg.Wait() diff --git a/accounts/keystore/passphrase.go b/accounts/keystore/passphrase.go index 9492b8311f2b..aad14137d5cf 100644 --- a/accounts/keystore/passphrase.go +++ b/accounts/keystore/passphrase.go @@ -340,7 +340,6 @@ func getKDFKey(cryptoJSON CryptoJSON, auth string) ([]byte, error) { r := ensureInt(cryptoJSON.KDFParams["r"]) p := ensureInt(cryptoJSON.KDFParams["p"]) return scrypt.Key(authArray, salt, n, r, p, dkLen) - } else if cryptoJSON.KDF == "pbkdf2" { c := ensureInt(cryptoJSON.KDFParams["c"]) prf := cryptoJSON.KDFParams["prf"].(string)