vm: do not use State as a mask

In NEO2 state could be used as a mask, but now it contains only a single
value.
This commit is contained in:
Evgenii Stratonikov 2020-05-21 09:26:31 +03:00
parent 063c29636b
commit 86c4f1abc5

View file

@ -338,7 +338,7 @@ func (v *VM) Run() error {
// check for breakpoint before executing the next instruction // check for breakpoint before executing the next instruction
ctx := v.Context() ctx := v.Context()
if ctx != nil && ctx.atBreakPoint() { if ctx != nil && ctx.atBreakPoint() {
v.state |= breakState v.state = breakState
} }
switch { switch {
case v.state.HasFlag(faultState): case v.state.HasFlag(faultState):
@ -376,7 +376,7 @@ func (v *VM) StepInto() error {
ctx := v.Context() ctx := v.Context()
if ctx == nil { if ctx == nil {
v.state |= haltState v.state = haltState
} }
if v.HasStopped() { if v.HasStopped() {