From bc5beb438f9fb132cc0a2b9f533319f325c7f036 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Mon, 2 Dec 2019 10:10:50 +0300 Subject: [PATCH] *: gofmt Somehow these crept into the repository. --- pkg/core/blockchainer.go | 2 +- pkg/crypto/keys/publickey_test.go | 2 +- pkg/rpc/tx_builder_test.go | 28 ++++++++++++++-------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pkg/core/blockchainer.go b/pkg/core/blockchainer.go index 0531d683d..a65d69847 100644 --- a/pkg/core/blockchainer.go +++ b/pkg/core/blockchainer.go @@ -28,7 +28,7 @@ type Blockchainer interface { HasTransaction(util.Uint256) bool GetAssetState(util.Uint256) *AssetState GetAccountState(util.Uint160) *AccountState - GetValidators(txes... *transaction.Transaction) ([]*keys.PublicKey, error) + GetValidators(txes ...*transaction.Transaction) ([]*keys.PublicKey, error) GetScriptHashesForVerifying(*transaction.Transaction) ([]util.Uint160, error) GetStorageItem(scripthash util.Uint160, key []byte) *StorageItem GetStorageItems(hash util.Uint160) (map[string]*StorageItem, error) diff --git a/pkg/crypto/keys/publickey_test.go b/pkg/crypto/keys/publickey_test.go index f85407a23..c7a8f7665 100644 --- a/pkg/crypto/keys/publickey_test.go +++ b/pkg/crypto/keys/publickey_test.go @@ -76,7 +76,7 @@ func TestDecodeBytes(t *testing.T) { decodedPubKey := &PublicKey{} err := decodedPubKey.DecodeBytes(pubKey.Bytes()) require.NoError(t, err) - require.Equal(t, pubKey,decodedPubKey) + require.Equal(t, pubKey, decodedPubKey) } func TestSort(t *testing.T) { diff --git a/pkg/rpc/tx_builder_test.go b/pkg/rpc/tx_builder_test.go index 0c3e1fa16..2a705ae8e 100644 --- a/pkg/rpc/tx_builder_test.go +++ b/pkg/rpc/tx_builder_test.go @@ -67,20 +67,20 @@ func TestInvocationScriptCreationBad(t *testing.T) { contract := util.Uint160{} var testParams = []Params{ - Params{{numberT, "qwerty"}}, - Params{{arrayT, 42}}, - Params{{arrayT, []Param{{numberT, 42}}}}, - Params{{arrayT, []Param{{funcParamT, FuncParam{ByteArray, Param{stringT, "qwerty"}}}}}}, - Params{{arrayT, []Param{{funcParamT, FuncParam{Signature, Param{stringT, "qwerty"}}}}}}, - Params{{arrayT, []Param{{funcParamT, FuncParam{String, Param{numberT, 42}}}}}}, - Params{{arrayT, []Param{{funcParamT, FuncParam{Hash160, Param{stringT, "qwerty"}}}}}}, - Params{{arrayT, []Param{{funcParamT, FuncParam{Hash256, Param{stringT, "qwerty"}}}}}}, - Params{{arrayT, []Param{{funcParamT, FuncParam{PublicKey, Param{numberT, 42}}}}}}, - Params{{arrayT, []Param{{funcParamT, FuncParam{PublicKey, Param{stringT, "qwerty"}}}}}}, - Params{{arrayT, []Param{{funcParamT, FuncParam{Integer, Param{stringT, "qwerty"}}}}}}, - Params{{arrayT, []Param{{funcParamT, FuncParam{Boolean, Param{numberT, 42}}}}}}, - Params{{arrayT, []Param{{funcParamT, FuncParam{Boolean, Param{stringT, "qwerty"}}}}}}, - Params{{arrayT, []Param{{funcParamT, FuncParam{Unknown, Param{}}}}}}, + {{numberT, "qwerty"}}, + {{arrayT, 42}}, + {{arrayT, []Param{{numberT, 42}}}}, + {{arrayT, []Param{{funcParamT, FuncParam{ByteArray, Param{stringT, "qwerty"}}}}}}, + {{arrayT, []Param{{funcParamT, FuncParam{Signature, Param{stringT, "qwerty"}}}}}}, + {{arrayT, []Param{{funcParamT, FuncParam{String, Param{numberT, 42}}}}}}, + {{arrayT, []Param{{funcParamT, FuncParam{Hash160, Param{stringT, "qwerty"}}}}}}, + {{arrayT, []Param{{funcParamT, FuncParam{Hash256, Param{stringT, "qwerty"}}}}}}, + {{arrayT, []Param{{funcParamT, FuncParam{PublicKey, Param{numberT, 42}}}}}}, + {{arrayT, []Param{{funcParamT, FuncParam{PublicKey, Param{stringT, "qwerty"}}}}}}, + {{arrayT, []Param{{funcParamT, FuncParam{Integer, Param{stringT, "qwerty"}}}}}}, + {{arrayT, []Param{{funcParamT, FuncParam{Boolean, Param{numberT, 42}}}}}}, + {{arrayT, []Param{{funcParamT, FuncParam{Boolean, Param{stringT, "qwerty"}}}}}}, + {{arrayT, []Param{{funcParamT, FuncParam{Unknown, Param{}}}}}}, } for _, ps := range testParams { _, err := CreateFunctionInvocationScript(contract, ps)