mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-11 15:30:07 +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"
|
||
|
}
|
||
|
}
|