From a7e973030c6c15a80831889827a14f4df23e66cf Mon Sep 17 00:00:00 2001 From: BlockChainDev Date: Sat, 16 Mar 2019 21:52:05 +0000 Subject: [PATCH] Remove context_test rename invocation to invocationstack export vmstate --- pkg/vm/stack/context_test.go | 20 ------------------- .../{invocation.go => invocationstack.go} | 0 pkg/vm/state.go | 3 ++- 3 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 pkg/vm/stack/context_test.go rename pkg/vm/stack/{invocation.go => invocationstack.go} (100%) diff --git a/pkg/vm/stack/context_test.go b/pkg/vm/stack/context_test.go deleted file mode 100644 index 6dbe36bb6..000000000 --- a/pkg/vm/stack/context_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package stack - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestNextInstruction(t *testing.T) { - // PUSHBYTES1 2 - builder := NewBuilder() - builder.EmitBytes([]byte{0x02}) //[]byte{0x01, 0x02} - - ctx := NewContext(builder.Bytes()) - op := ctx.Next() - byt := ctx.readByte() - - assert.Equal(t, PUSHBYTES1, op) - assert.Equal(t, byte(2), byt) -} diff --git a/pkg/vm/stack/invocation.go b/pkg/vm/stack/invocationstack.go similarity index 100% rename from pkg/vm/stack/invocation.go rename to pkg/vm/stack/invocationstack.go diff --git a/pkg/vm/state.go b/pkg/vm/state.go index 4090ec86e..64db70f2f 100644 --- a/pkg/vm/state.go +++ b/pkg/vm/state.go @@ -1,6 +1,7 @@ package vm -type vmstate byte +//Vmstate represents all possible states that the neo-vm can be in +type Vmstate byte const ( NONE = 0