interop: move invocation counter from VM to Context

It's created for interop and used by interop, VM doesn't care.
This commit is contained in:
Roman Khimov 2021-11-19 20:25:58 +03:00
parent 29cda5112a
commit 83d0b2f465
6 changed files with 8 additions and 10 deletions

View file

@ -97,9 +97,9 @@ func TestRuntimeGetNotifications(t *testing.T) {
}
func TestRuntimeGetInvocationCounter(t *testing.T) {
ic := &interop.Context{VM: vm.New()}
ic := &interop.Context{VM: vm.New(), Invocations: make(map[util.Uint160]int)}
h := random.Uint160()
ic.VM.Invocations[h] = 42
ic.Invocations[h] = 42
t.Run("No invocations", func(t *testing.T) {
h1 := h