From 9e16bac7d8c31ef701f5f615a76161e9f2e51a16 Mon Sep 17 00:00:00 2001 From: BlockChainDev Date: Sun, 17 Mar 2019 20:21:48 +0000 Subject: [PATCH] clarify vm states --- pkg/vm/state.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkg/vm/state.go b/pkg/vm/state.go index 98c5cc912..e6760c7c9 100644 --- a/pkg/vm/state.go +++ b/pkg/vm/state.go @@ -5,8 +5,16 @@ type Vmstate byte // List of possible vm states const ( - NONE = 0 - HALT = 1 << 0 + // NONE is the running state of the vm + // NONE signifies that the vm is ready to process an opcode + NONE = 0 + // HALT is a stopped state of the vm + // where the stop was signalled by the program completion + HALT = 1 << 0 + // FAULT is a stopped state of the vm + // where the stop was signalled by an error in the program FAULT = 1 << 1 + // BREAK is a suspended state for the VM + // were the break was signalled by a breakpoint BREAK = 1 << 2 )