compiler: use CALLT for native contract calls, fix #2257

This commit is contained in:
Roman Khimov 2021-12-08 22:33:03 +03:00
parent 06fc450789
commit 299a7ea614
26 changed files with 322 additions and 190 deletions

View file

@ -134,7 +134,7 @@ func TestContractWithNoMain(t *testing.T) {
b, di, err := compiler.CompileWithDebugInfo("foo.go", strings.NewReader(src))
require.NoError(t, err)
v := vm.New()
invokeMethod(t, "Add3", b, v, di)
invokeMethod(t, "Add3", b.Script, v, di)
v.Estack().PushVal(39)
require.NoError(t, v.Run())
require.Equal(t, 1, v.Estack().Len())