From 6cc180391eae9dd1a4af7f32e97cda357acf7439 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 18 Jul 2022 11:33:53 +0300 Subject: [PATCH] [#1606] go.mod: Update neo-go Signed-off-by: Evgenii Stratonikov --- cmd/neofs-adm/internal/modules/morph/balance.go | 8 ++++---- cmd/neofs-adm/internal/modules/morph/config.go | 6 +++--- cmd/neofs-adm/internal/modules/morph/epoch.go | 4 ++-- cmd/neofs-adm/internal/modules/morph/initialize.go | 6 +++--- .../internal/modules/morph/initialize_deploy.go | 12 ++++++------ .../internal/modules/morph/initialize_nns.go | 6 +++--- .../internal/modules/morph/initialize_register.go | 4 ++-- cmd/neofs-adm/internal/modules/morph/local_client.go | 6 +++--- cmd/neofs-adm/internal/modules/storagecfg/root.go | 4 ++-- go.mod | 4 ++-- go.sum | 11 +++++------ pkg/morph/client/client.go | 6 +++--- pkg/morph/client/nns.go | 4 ++-- 13 files changed, 40 insertions(+), 41 deletions(-) diff --git a/cmd/neofs-adm/internal/modules/morph/balance.go b/cmd/neofs-adm/internal/modules/morph/balance.go index a113758b9..480a3e9de 100644 --- a/cmd/neofs-adm/internal/modules/morph/balance.go +++ b/cmd/neofs-adm/internal/modules/morph/balance.go @@ -15,9 +15,9 @@ import ( "github.com/nspcc-dev/neo-go/pkg/io" "github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag" "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neo-go/pkg/vm" "github.com/nspcc-dev/neo-go/pkg/vm/emit" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" + "github.com/nspcc-dev/neo-go/pkg/vm/vmstate" "github.com/nspcc-dev/neofs-contract/nns" "github.com/nspcc-dev/neofs-sdk-go/netmap" "github.com/spf13/cobra" @@ -94,7 +94,7 @@ func dumpBalances(cmd *cobra.Command, _ []string) error { if dumpStorage { res, err := invokeFunction(c, nmHash, "netmap", []interface{}{}, nil) - if err != nil || res.State != vm.HaltState.String() || len(res.Stack) == 0 { + if err != nil || res.State != vmstate.Halt.String() || len(res.Stack) == 0 { return errors.New("can't fetch the list of storage nodes") } arr, ok := res.Stack[0].Value().([]stackitem.Item) @@ -197,7 +197,7 @@ func fetchIRNodes(c Client, nmHash, desigHash util.Uint160) ([]accBalancePair, e } } else { res, err := invokeFunction(c, nmHash, "innerRingList", []interface{}{}, nil) - if err != nil || res.State != vm.HaltState.String() || len(res.Stack) == 0 { + if err != nil || res.State != vmstate.Halt.String() || len(res.Stack) == 0 { return nil, errors.New("can't fetch list of IR nodes from the netmap contract") } @@ -251,7 +251,7 @@ func fetchBalances(c Client, gasHash util.Uint160, accounts []accBalancePair) er } res, err := c.InvokeScript(w.Bytes(), nil) - if err != nil || res.State != vm.HaltState.String() || len(res.Stack) != len(accounts) { + if err != nil || res.State != vmstate.Halt.String() || len(res.Stack) != len(accounts) { return errors.New("can't fetch account balances") } diff --git a/cmd/neofs-adm/internal/modules/morph/config.go b/cmd/neofs-adm/internal/modules/morph/config.go index ff2702e7b..9f969a526 100644 --- a/cmd/neofs-adm/internal/modules/morph/config.go +++ b/cmd/neofs-adm/internal/modules/morph/config.go @@ -13,9 +13,9 @@ import ( "github.com/nspcc-dev/neo-go/pkg/io" "github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag" "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neo-go/pkg/vm" "github.com/nspcc-dev/neo-go/pkg/vm/emit" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" + "github.com/nspcc-dev/neo-go/pkg/vm/vmstate" "github.com/nspcc-dev/neofs-contract/nns" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -112,7 +112,7 @@ func dumpContractHashes(cmd *cobra.Command, _ []string) error { return fmt.Errorf("can't fetch info from NNS: %w", err) } - if res.State == vm.HaltState.String() { + if res.State == vmstate.Halt.String() { for i := range res.Stack { infos[i].version = parseContractVersion(res.Stack[i]) } @@ -163,7 +163,7 @@ func dumpNetworkConfig(cmd *cobra.Command, _ []string) error { } res, err := invokeFunction(c, nmHash, "listConfig", nil, nil) - if err != nil || res.State != vm.HaltState.String() || len(res.Stack) == 0 { + if err != nil || res.State != vmstate.Halt.String() || len(res.Stack) == 0 { return errors.New("can't fetch list of network config keys from the netmap contract") } diff --git a/cmd/neofs-adm/internal/modules/morph/epoch.go b/cmd/neofs-adm/internal/modules/morph/epoch.go index 67dd048c9..bbf498e27 100644 --- a/cmd/neofs-adm/internal/modules/morph/epoch.go +++ b/cmd/neofs-adm/internal/modules/morph/epoch.go @@ -7,8 +7,8 @@ import ( "github.com/nspcc-dev/neo-go/pkg/io" "github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag" "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neo-go/pkg/vm" "github.com/nspcc-dev/neo-go/pkg/vm/emit" + "github.com/nspcc-dev/neo-go/pkg/vm/vmstate" "github.com/spf13/cobra" "github.com/spf13/viper" ) @@ -43,7 +43,7 @@ func forceNewEpochCmd(cmd *cobra.Command, args []string) error { func emitNewEpochCall(bw *io.BufBinWriter, wCtx *initializeContext, nmHash util.Uint160) error { res, err := invokeFunction(wCtx.Client, nmHash, "epoch", nil, nil) - if err != nil || res.State != vm.HaltState.String() || len(res.Stack) == 0 { + if err != nil || res.State != vmstate.Halt.String() || len(res.Stack) == 0 { return errors.New("can't fetch current epoch from the netmap contract") } diff --git a/cmd/neofs-adm/internal/modules/morph/initialize.go b/cmd/neofs-adm/internal/modules/morph/initialize.go index aa63eff62..9ffd2853d 100644 --- a/cmd/neofs-adm/internal/modules/morph/initialize.go +++ b/cmd/neofs-adm/internal/modules/morph/initialize.go @@ -14,7 +14,7 @@ import ( "github.com/nspcc-dev/neo-go/pkg/rpc/client" "github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger" "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neo-go/pkg/vm" + "github.com/nspcc-dev/neo-go/pkg/vm/vmstate" "github.com/nspcc-dev/neo-go/pkg/wallet" "github.com/nspcc-dev/neofs-node/cmd/neofs-adm/internal/modules/config" "github.com/nspcc-dev/neofs-node/pkg/innerring" @@ -333,7 +333,7 @@ loop: for i := range c.Hashes { res, err := c.Client.GetApplicationLog(c.Hashes[i], &at) if err == nil { - if retErr == nil && len(res.Executions) > 0 && res.Executions[0].VMState != vm.HaltState { + if retErr == nil && len(res.Executions) > 0 && res.Executions[0].VMState != vmstate.Halt { retErr = fmt.Errorf("tx %d persisted in %s state: %s", i, res.Executions[0].VMState, res.Executions[0].FaultException) } @@ -344,7 +344,7 @@ loop: case <-tick.C: res, err := c.Client.GetApplicationLog(c.Hashes[i], &at) if err == nil { - if retErr == nil && len(res.Executions) > 0 && res.Executions[0].VMState != vm.HaltState { + if retErr == nil && len(res.Executions) > 0 && res.Executions[0].VMState != vmstate.Halt { retErr = fmt.Errorf("tx %d persisted in %s state: %s", i, res.Executions[0].VMState, res.Executions[0].FaultException) } diff --git a/cmd/neofs-adm/internal/modules/morph/initialize_deploy.go b/cmd/neofs-adm/internal/modules/morph/initialize_deploy.go index 0a217ca3c..0aba7dfec 100644 --- a/cmd/neofs-adm/internal/modules/morph/initialize_deploy.go +++ b/cmd/neofs-adm/internal/modules/morph/initialize_deploy.go @@ -23,9 +23,9 @@ import ( "github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest" "github.com/nspcc-dev/neo-go/pkg/smartcontract/nef" "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neo-go/pkg/vm" "github.com/nspcc-dev/neo-go/pkg/vm/emit" "github.com/nspcc-dev/neo-go/pkg/vm/opcode" + "github.com/nspcc-dev/neo-go/pkg/vm/vmstate" "github.com/nspcc-dev/neofs-node/pkg/innerring" morphClient "github.com/nspcc-dev/neofs-node/pkg/morph/client" "github.com/spf13/viper" @@ -129,7 +129,7 @@ func (c *initializeContext) deployNNS(method string) error { if err != nil { return fmt.Errorf("can't deploy NNS contract: %w", err) } - if res.State != vm.HaltState.String() { + if res.State != vmstate.Halt.String() { return fmt.Errorf("can't deploy NNS contract: %s", res.FaultException) } @@ -201,7 +201,7 @@ func (c *initializeContext) updateContracts() error { if err != nil { return fmt.Errorf("can't update alphabet contracts: %w", err) } - if res.State != vm.HaltState.String() { + if res.State != vmstate.Halt.String() { return fmt.Errorf("can't update alphabet contracts: %s", res.FaultException) } @@ -243,7 +243,7 @@ func (c *initializeContext) updateContracts() error { if err != nil { return fmt.Errorf("can't deploy %s contract: %w", ctrName, err) } - if res.State != vm.HaltState.String() { + if res.State != vmstate.Halt.String() { return fmt.Errorf("can't deploy %s contract: %s", ctrName, res.FaultException) } @@ -311,7 +311,7 @@ func (c *initializeContext) deployContracts() error { if err != nil { return fmt.Errorf("can't deploy alphabet #%d contract: %w", i, err) } - if res.State != vm.HaltState.String() { + if res.State != vmstate.Halt.String() { return fmt.Errorf("can't deploy alpabet #%d contract: %s", i, res.FaultException) } @@ -344,7 +344,7 @@ func (c *initializeContext) deployContracts() error { if err != nil { return fmt.Errorf("can't deploy %s contract: %w", ctrName, err) } - if res.State != vm.HaltState.String() { + if res.State != vmstate.Halt.String() { return fmt.Errorf("can't deploy %s contract: %s", ctrName, res.FaultException) } diff --git a/cmd/neofs-adm/internal/modules/morph/initialize_nns.go b/cmd/neofs-adm/internal/modules/morph/initialize_nns.go index d59a03077..63e94d063 100644 --- a/cmd/neofs-adm/internal/modules/morph/initialize_nns.go +++ b/cmd/neofs-adm/internal/modules/morph/initialize_nns.go @@ -14,10 +14,10 @@ import ( "github.com/nspcc-dev/neo-go/pkg/rpc/client" "github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag" "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neo-go/pkg/vm" "github.com/nspcc-dev/neo-go/pkg/vm/emit" "github.com/nspcc-dev/neo-go/pkg/vm/opcode" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" + "github.com/nspcc-dev/neo-go/pkg/vm/vmstate" "github.com/nspcc-dev/neofs-contract/nns" morphClient "github.com/nspcc-dev/neofs-node/pkg/morph/client" ) @@ -169,7 +169,7 @@ func (c *initializeContext) nnsRootRegistered(nnsHash util.Uint160) (bool, error if err != nil { return false, err } - return res.State == vm.HaltState.String(), nil + return res.State == vmstate.Halt.String(), nil } var errMissingNNSRecord = errors.New("missing NNS record") @@ -188,7 +188,7 @@ func nnsResolve(c Client, nnsHash util.Uint160, domain string) (stackitem.Item, if err != nil { return nil, fmt.Errorf("`resolve`: %w", err) } - if result.State != vm.HaltState.String() { + if result.State != vmstate.Halt.String() { if strings.Contains(result.FaultException, "token not found") { return nil, errMissingNNSRecord } diff --git a/cmd/neofs-adm/internal/modules/morph/initialize_register.go b/cmd/neofs-adm/internal/modules/morph/initialize_register.go index 2480978ff..9a770dc85 100644 --- a/cmd/neofs-adm/internal/modules/morph/initialize_register.go +++ b/cmd/neofs-adm/internal/modules/morph/initialize_register.go @@ -11,10 +11,10 @@ import ( "github.com/nspcc-dev/neo-go/pkg/rpc/client" "github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag" "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neo-go/pkg/vm" "github.com/nspcc-dev/neo-go/pkg/vm/emit" "github.com/nspcc-dev/neo-go/pkg/vm/opcode" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" + "github.com/nspcc-dev/neo-go/pkg/vm/vmstate" ) // initialAlphabetNEOAmount represents the total amount of GAS distributed between alphabet nodes. @@ -27,7 +27,7 @@ func (c *initializeContext) registerCandidates() error { if err != nil { return err } - if res.State == vm.HaltState.String() && len(res.Stack) > 0 { + if res.State == vmstate.Halt.String() && len(res.Stack) > 0 { arr, ok := res.Stack[0].Value().([]stackitem.Item) if ok && len(arr) > 0 { return nil diff --git a/cmd/neofs-adm/internal/modules/morph/local_client.go b/cmd/neofs-adm/internal/modules/morph/local_client.go index 746079c7a..ba4971033 100644 --- a/cmd/neofs-adm/internal/modules/morph/local_client.go +++ b/cmd/neofs-adm/internal/modules/morph/local_client.go @@ -28,10 +28,10 @@ import ( "github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag" "github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger" "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neo-go/pkg/vm" "github.com/nspcc-dev/neo-go/pkg/vm/emit" "github.com/nspcc-dev/neo-go/pkg/vm/opcode" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" + "github.com/nspcc-dev/neo-go/pkg/vm/vmstate" "github.com/nspcc-dev/neo-go/pkg/wallet" "github.com/spf13/viper" "go.uber.org/zap" @@ -233,7 +233,7 @@ func (l *localClient) NEP17BalanceOf(h util.Uint160, acc util.Uint160) (int64, e if err != nil { return 0, err } - if res.State != vm.HaltState.String() || len(res.Stack) == 0 { + if res.State != vmstate.Halt.String() || len(res.Stack) == 0 { return 0, fmt.Errorf("`balance`: invalid response (empty: %t): %s", len(res.Stack) == 0, res.FaultException) } @@ -341,7 +341,7 @@ func getDesignatedByRole(c Client, h util.Uint160, role noderoles.Role, u uint32 if err != nil { return nil, err } - if res.State != vm.HaltState.String() || len(res.Stack) == 0 { + if res.State != vmstate.Halt.String() || len(res.Stack) == 0 { return nil, errGetDesignatedByRoleResponse } arr, ok := res.Stack[0].Value().([]stackitem.Item) diff --git a/cmd/neofs-adm/internal/modules/storagecfg/root.go b/cmd/neofs-adm/internal/modules/storagecfg/root.go index 45fd9abb6..3e6fb5faf 100644 --- a/cmd/neofs-adm/internal/modules/storagecfg/root.go +++ b/cmd/neofs-adm/internal/modules/storagecfg/root.go @@ -28,7 +28,7 @@ import ( "github.com/nspcc-dev/neo-go/pkg/smartcontract" "github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger" "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neo-go/pkg/vm" + "github.com/nspcc-dev/neo-go/pkg/vm/vmstate" "github.com/nspcc-dev/neo-go/pkg/wallet" netutil "github.com/nspcc-dev/neofs-node/pkg/network" @@ -328,7 +328,7 @@ func depositGas(cmd *cobra.Command, acc *wallet.Account, network string) { }}, nil) fatalOnErr(err) - if res.State != vm.HaltState.String() { + if res.State != vmstate.Halt.String() { fatalOnErr(fmt.Errorf("invalid response from balance contract: %s", res.FaultException)) } diff --git a/go.mod b/go.mod index 7b096a85e..a6ccbecc1 100644 --- a/go.mod +++ b/go.mod @@ -15,8 +15,8 @@ require ( github.com/multiformats/go-multiaddr v0.4.0 github.com/nats-io/nats.go v1.13.1-0.20220308171302-2f2f6968e98d github.com/nspcc-dev/hrw v1.0.9 - github.com/nspcc-dev/neo-go v0.99.1-pre.0.20220609082921-2c9fb2044242 - github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220601120906-3bec6657f5c5 // indirect + github.com/nspcc-dev/neo-go v0.99.1-pre.0.20220714084516-54849ef3e58e + github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220713145417-4f184498bc42 // indirect github.com/nspcc-dev/neofs-api-go/v2 v2.13.0 github.com/nspcc-dev/neofs-contract v0.15.1 github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.5.0.20220706151041-0d862d8568a4 diff --git a/go.sum b/go.sum index b74ff3867..1c82bb69f 100644 --- a/go.sum +++ b/go.sum @@ -383,7 +383,7 @@ github.com/nspcc-dev/dbft v0.0.0-20191209120240-0d6b7568d9ae/go.mod h1:3FjXOoHmA github.com/nspcc-dev/dbft v0.0.0-20200117124306-478e5cfbf03a/go.mod h1:/YFK+XOxxg0Bfm6P92lY5eDSLYfp06XOdL8KAVgXjVk= github.com/nspcc-dev/dbft v0.0.0-20200219114139-199d286ed6c1/go.mod h1:O0qtn62prQSqizzoagHmuuKoz8QMkU3SzBoKdEvm3aQ= github.com/nspcc-dev/dbft v0.0.0-20210721160347-1b03241391ac/go.mod h1:U8MSnEShH+o5hexfWJdze6uMFJteP0ko7J2frO7Yu1Y= -github.com/nspcc-dev/dbft v0.0.0-20220607072117-13b88a757795/go.mod h1:U8MSnEShH+o5hexfWJdze6uMFJteP0ko7J2frO7Yu1Y= +github.com/nspcc-dev/dbft v0.0.0-20220629112714-fd49ca59d354/go.mod h1:U8MSnEShH+o5hexfWJdze6uMFJteP0ko7J2frO7Yu1Y= github.com/nspcc-dev/go-ordered-json v0.0.0-20210915112629-e1b6cce73d02/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U= github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 h1:n4ZaFCKt1pQJd7PXoMJabZWK9ejjbLOVrkl/lOUmshg= github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U= @@ -392,11 +392,11 @@ github.com/nspcc-dev/hrw v1.0.9/go.mod h1:l/W2vx83vMQo6aStyx2AuZrJ+07lGv2JQGlVkP github.com/nspcc-dev/neo-go v0.73.1-pre.0.20200303142215-f5a1b928ce09/go.mod h1:pPYwPZ2ks+uMnlRLUyXOpLieaDQSEaf4NM3zHVbRjmg= github.com/nspcc-dev/neo-go v0.98.0/go.mod h1:E3cc1x6RXSXrJb2nDWXTXjnXk3rIqVN8YdFyWv+FrqM= github.com/nspcc-dev/neo-go v0.98.2/go.mod h1:KXKqJwfTyVJzDarSCDqFaKrVbg/qz0ZBk2c3AtzqS5M= -github.com/nspcc-dev/neo-go v0.99.1-pre.0.20220609082921-2c9fb2044242 h1:ZUn1jvACtO69ifOjRaN65fOZWhvoCfF9RLC3kbmJbrs= -github.com/nspcc-dev/neo-go v0.99.1-pre.0.20220609082921-2c9fb2044242/go.mod h1:bqZE6KEASU2ANTIc75p9++ABSxi4ZDEMjpwZQCPc4ps= +github.com/nspcc-dev/neo-go v0.99.1-pre.0.20220714084516-54849ef3e58e h1:sjl8sniYkjoOsD8F+wzkpRfm9RzZSLQlh5Z/SMyf4A8= +github.com/nspcc-dev/neo-go v0.99.1-pre.0.20220714084516-54849ef3e58e/go.mod h1:/y5Sl8p3YheTygriBtCCMWKkDOek8HcvSo5ds2rJtKI= github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220321113211-526c423a6152/go.mod h1:QBE0I30F2kOAISNpT5oks82yF4wkkUq3SCfI3Hqgx/Y= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220601120906-3bec6657f5c5 h1:bWau94hHSkztNF7EDTkvQAc8xjsxGMnaFf1DrXguvX8= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220601120906-3bec6657f5c5/go.mod h1:QBE0I30F2kOAISNpT5oks82yF4wkkUq3SCfI3Hqgx/Y= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220713145417-4f184498bc42 h1:Krhg2cD5mqvC+lin7irw6hj0M+x4ZOZrRGzrZQB+wcQ= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220713145417-4f184498bc42/go.mod h1:QBE0I30F2kOAISNpT5oks82yF4wkkUq3SCfI3Hqgx/Y= github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211201134523-3604d96f3fe1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs= github.com/nspcc-dev/neofs-api-go/v2 v2.11.1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs= github.com/nspcc-dev/neofs-api-go/v2 v2.13.0 h1:7BcBiSjmWqJx0SPFlGRYt9ZFbMjucRIz9+Mv8UBLeq8= @@ -440,7 +440,6 @@ github.com/paulmach/protoscan v0.2.1-0.20210522164731-4e53c6875432/go.mod h1:2sV github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= diff --git a/pkg/morph/client/client.go b/pkg/morph/client/client.go index dd5ad73fc..98613c441 100644 --- a/pkg/morph/client/client.go +++ b/pkg/morph/client/client.go @@ -18,8 +18,8 @@ import ( sc "github.com/nspcc-dev/neo-go/pkg/smartcontract" "github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger" "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neo-go/pkg/vm" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" + "github.com/nspcc-dev/neo-go/pkg/vm/vmstate" "github.com/nspcc-dev/neo-go/pkg/wallet" "github.com/nspcc-dev/neofs-node/pkg/util/logger" "go.uber.org/zap" @@ -385,7 +385,7 @@ func (c *Client) TxHalt(h util.Uint256) (res bool, err error) { if err != nil { return false, err } - return len(aer.Executions) > 0 && aer.Executions[0].VMState.HasFlag(vm.HaltState), nil + return len(aer.Executions) > 0 && aer.Executions[0].VMState.HasFlag(vmstate.Halt), nil } // TxHeight returns true if transaction has been successfully executed and persisted. @@ -562,7 +562,7 @@ func (c *Client) IsValidScript(script []byte, signers []transaction.Signer) (res return false, fmt.Errorf("invokeScript: %w", err) } - return result.State == vm.HaltState.String(), nil + return result.State == vmstate.Halt.String(), nil } // NotificationChannel returns channel than receives subscribed diff --git a/pkg/morph/client/nns.go b/pkg/morph/client/nns.go index eff76c2bf..3bf29c567 100644 --- a/pkg/morph/client/nns.go +++ b/pkg/morph/client/nns.go @@ -11,8 +11,8 @@ import ( "github.com/nspcc-dev/neo-go/pkg/rpc/client" "github.com/nspcc-dev/neo-go/pkg/smartcontract" "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neo-go/pkg/vm" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" + "github.com/nspcc-dev/neo-go/pkg/vm/vmstate" "github.com/nspcc-dev/neofs-contract/nns" ) @@ -121,7 +121,7 @@ func nnsResolveItem(c *client.WSClient, nnsHash util.Uint160, domain string) (st if err != nil { return nil, err } - if result.State != vm.HaltState.String() { + if result.State != vmstate.Halt.String() { return nil, fmt.Errorf("invocation failed: %s", result.FaultException) } if len(result.Stack) == 0 {