*: move syscall handling out of VM

Remove interop-related structures from the `vm` package.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2020-07-28 16:38:00 +03:00
parent f24e707ea1
commit 51ae12e4fd
17 changed files with 195 additions and 257 deletions

View file

@ -23,7 +23,8 @@ func TestSHA256(t *testing.T) {
`
v := vmAndCompile(t, src)
ic := &interop.Context{Trigger: trigger.Verification}
v.RegisterInteropGetter(crypto.GetInterop(ic))
crypto.Register(ic)
v.SyscallHandler = ic.SyscallHandler
require.NoError(t, v.Run())
require.True(t, v.Estack().Len() >= 1)