mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-08 19:10:30 +00:00
core: use ic.SpawnVM() in tests, not vm.New()
vm.New() sets some arbitrary trigger while interop context always sets something appropriate according to its state.
This commit is contained in:
parent
d4da811d12
commit
2924ecd453
4 changed files with 20 additions and 25 deletions
|
@ -79,7 +79,7 @@ func TestDesignate_DesignateAsRole(t *testing.T) {
|
|||
des := bc.contracts.Designate
|
||||
tx := transaction.New(netmode.UnitTestNet, []byte{}, 0)
|
||||
ic := bc.newInteropContext(trigger.System, bc.dao, nil, tx)
|
||||
ic.VM = vm.New()
|
||||
ic.SpawnVM()
|
||||
ic.VM.LoadScript([]byte{byte(opcode.RET)})
|
||||
|
||||
pubs, err := des.GetDesignatedByRole(bc.dao, 0xFF)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue