Skip to content

Commit

Permalink
vm: replace hardcoded Bool type constant with BooleanT type
Browse files Browse the repository at this point in the history
There's no import cycle problem anymore, so we can do this. Part of #912
  • Loading branch information
AnnaShaleva committed Jun 8, 2020
1 parent 2e7dc0f commit 890fc35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/vm/emit/emit.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/nspcc-dev/neo-go/pkg/io"
"github.com/nspcc-dev/neo-go/pkg/util"
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
)

// Instruction emits a VM Instruction with data to the given buffer.
Expand All @@ -32,7 +33,7 @@ func Bool(w *io.BinWriter, ok bool) {
return
}
Opcode(w, opcode.PUSHF)
Instruction(w, opcode.CONVERT, []byte{0x20}) // 0x20 for Boolean type
Instruction(w, opcode.CONVERT, []byte{byte(stackitem.BooleanT)})
}

func padRight(s int, buf []byte) []byte {
Expand Down

0 comments on commit 890fc35

Please sign in to comment.