smartcontract: move flags to a separate package
This commit is contained in:
parent
36b5751262
commit
dbe81f9b80
29 changed files with 182 additions and 171 deletions
|
@ -16,6 +16,7 @@ import (
|
|||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
"github.com/nspcc-dev/neo-go/pkg/io"
|
||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
||||
"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/smartcontract/trigger"
|
||||
|
@ -171,7 +172,7 @@ func TestOracle_Request(t *testing.T) {
|
|||
|
||||
// We need to ensure that callback is called thus, executing full script is necessary.
|
||||
resp.ID = 1
|
||||
ic.VM.LoadScriptWithFlags(tx.Script, smartcontract.All)
|
||||
ic.VM.LoadScriptWithFlags(tx.Script, callflag.All)
|
||||
require.NoError(t, ic.VM.Run())
|
||||
|
||||
si := ic.DAO.GetStorageItem(cs.ID, []byte("lastOracleResponse"))
|
||||
|
@ -211,7 +212,7 @@ func TestOracle_Request(t *testing.T) {
|
|||
}}
|
||||
ic := bc.newInteropContext(trigger.Application, bc.dao, bc.newBlock(tx), tx)
|
||||
ic.VM = ic.SpawnVM()
|
||||
ic.VM.LoadScriptWithFlags(tx.Script, smartcontract.All)
|
||||
ic.VM.LoadScriptWithFlags(tx.Script, callflag.All)
|
||||
require.Error(t, ic.VM.Run())
|
||||
|
||||
// Request is cleaned up even if callback failed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue