Somehow these crept into the repository.
This commit is contained in:
Roman Khimov 2019-12-02 10:10:50 +03:00
parent c8ce1997a4
commit bc5beb438f
3 changed files with 16 additions and 16 deletions

View file

@ -28,7 +28,7 @@ type Blockchainer interface {
HasTransaction(util.Uint256) bool HasTransaction(util.Uint256) bool
GetAssetState(util.Uint256) *AssetState GetAssetState(util.Uint256) *AssetState
GetAccountState(util.Uint160) *AccountState GetAccountState(util.Uint160) *AccountState
GetValidators(txes... *transaction.Transaction) ([]*keys.PublicKey, error) GetValidators(txes ...*transaction.Transaction) ([]*keys.PublicKey, error)
GetScriptHashesForVerifying(*transaction.Transaction) ([]util.Uint160, error) GetScriptHashesForVerifying(*transaction.Transaction) ([]util.Uint160, error)
GetStorageItem(scripthash util.Uint160, key []byte) *StorageItem GetStorageItem(scripthash util.Uint160, key []byte) *StorageItem
GetStorageItems(hash util.Uint160) (map[string]*StorageItem, error) GetStorageItems(hash util.Uint160) (map[string]*StorageItem, error)

View file

@ -76,7 +76,7 @@ func TestDecodeBytes(t *testing.T) {
decodedPubKey := &PublicKey{} decodedPubKey := &PublicKey{}
err := decodedPubKey.DecodeBytes(pubKey.Bytes()) err := decodedPubKey.DecodeBytes(pubKey.Bytes())
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, pubKey,decodedPubKey) require.Equal(t, pubKey, decodedPubKey)
} }
func TestSort(t *testing.T) { func TestSort(t *testing.T) {

View file

@ -67,20 +67,20 @@ func TestInvocationScriptCreationBad(t *testing.T) {
contract := util.Uint160{} contract := util.Uint160{}
var testParams = []Params{ var testParams = []Params{
Params{{numberT, "qwerty"}}, {{numberT, "qwerty"}},
Params{{arrayT, 42}}, {{arrayT, 42}},
Params{{arrayT, []Param{{numberT, 42}}}}, {{arrayT, []Param{{numberT, 42}}}},
Params{{arrayT, []Param{{funcParamT, FuncParam{ByteArray, Param{stringT, "qwerty"}}}}}}, {{arrayT, []Param{{funcParamT, FuncParam{ByteArray, Param{stringT, "qwerty"}}}}}},
Params{{arrayT, []Param{{funcParamT, FuncParam{Signature, Param{stringT, "qwerty"}}}}}}, {{arrayT, []Param{{funcParamT, FuncParam{Signature, Param{stringT, "qwerty"}}}}}},
Params{{arrayT, []Param{{funcParamT, FuncParam{String, Param{numberT, 42}}}}}}, {{arrayT, []Param{{funcParamT, FuncParam{String, Param{numberT, 42}}}}}},
Params{{arrayT, []Param{{funcParamT, FuncParam{Hash160, Param{stringT, "qwerty"}}}}}}, {{arrayT, []Param{{funcParamT, FuncParam{Hash160, Param{stringT, "qwerty"}}}}}},
Params{{arrayT, []Param{{funcParamT, FuncParam{Hash256, Param{stringT, "qwerty"}}}}}}, {{arrayT, []Param{{funcParamT, FuncParam{Hash256, Param{stringT, "qwerty"}}}}}},
Params{{arrayT, []Param{{funcParamT, FuncParam{PublicKey, Param{numberT, 42}}}}}}, {{arrayT, []Param{{funcParamT, FuncParam{PublicKey, Param{numberT, 42}}}}}},
Params{{arrayT, []Param{{funcParamT, FuncParam{PublicKey, Param{stringT, "qwerty"}}}}}}, {{arrayT, []Param{{funcParamT, FuncParam{PublicKey, Param{stringT, "qwerty"}}}}}},
Params{{arrayT, []Param{{funcParamT, FuncParam{Integer, Param{stringT, "qwerty"}}}}}}, {{arrayT, []Param{{funcParamT, FuncParam{Integer, Param{stringT, "qwerty"}}}}}},
Params{{arrayT, []Param{{funcParamT, FuncParam{Boolean, Param{numberT, 42}}}}}}, {{arrayT, []Param{{funcParamT, FuncParam{Boolean, Param{numberT, 42}}}}}},
Params{{arrayT, []Param{{funcParamT, FuncParam{Boolean, Param{stringT, "qwerty"}}}}}}, {{arrayT, []Param{{funcParamT, FuncParam{Boolean, Param{stringT, "qwerty"}}}}}},
Params{{arrayT, []Param{{funcParamT, FuncParam{Unknown, Param{}}}}}}, {{arrayT, []Param{{funcParamT, FuncParam{Unknown, Param{}}}}}},
} }
for _, ps := range testParams { for _, ps := range testParams {
_, err := CreateFunctionInvocationScript(contract, ps) _, err := CreateFunctionInvocationScript(contract, ps)