mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-25 03:56:34 +00:00
26 lines
319 B
Go
26 lines
319 B
Go
|
package vm
|
||
|
|
||
|
// State of the VM.
|
||
|
type State uint
|
||
|
|
||
|
// Available States.
|
||
|
const (
|
||
|
noneState State = iota
|
||
|
haltState
|
||
|
faultState
|
||
|
breakState
|
||
|
)
|
||
|
|
||
|
func (s State) String() string {
|
||
|
switch s {
|
||
|
case haltState:
|
||
|
return "HALT"
|
||
|
case faultState:
|
||
|
return "FAULT"
|
||
|
case breakState:
|
||
|
return "BREAK"
|
||
|
default:
|
||
|
return "NONE"
|
||
|
}
|
||
|
}
|